title: How to remove empty associative array entries
body: <p>I have an associative array: <code>$csv_arr</code></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [Enfalac] =&gt; alpha linolenic acid 300 mg
              [Enfapro] =&gt; alpha linolenic acid 200 mg
          )
  
      [1] =&gt; Array
          (
              [Enfalac] =&gt; arachidonic acid 170 mg
              [Enfapro] =&gt; 
          )
  
      [2] =&gt; Array
          (
              [Enfalac] =&gt; 
              [Enfapro] =&gt; 
          )
  
      [3] =&gt; Array
          (
              [Enfalac] =&gt; calcium 410 mg
              [Enfapro] =&gt; calcium 550 mg
          )
  )
  </code></pre>
  
  <p>How can I remove all completely empty entries such as <code>$csv_arr[2]</code> but preserve partial entries such as <code>$csv_arr[1]</code></p>
  
  <p>I've tried <code>$csv_arr = array_filter(array_map('array_filter', $csv_arr));</code> but this removes the empty element: <code>$csv_arr[1]['Enfapro']</code></p>
  
  <p>Thx</p>