title: Looping through and clearing arrays
body: <p>I have arrays within arrays, all with varying amounts of information. My CSV table currently has the fields Name, Email, and  Phone Number. 
  Below is my array;</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; Name
          [1] =&gt; Email
          [2] =&gt; Phone Number
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; Mick
          [1] =&gt; mick@mick.com
          [2] =&gt; 01234 324234
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; james
          [1] =&gt; james@james.com
          [2] =&gt; 
      )
  
  [3] =&gt; Array
      (
          [0] =&gt; reg
          [1] =&gt; reg@reg.com
          [2] =&gt; 10293 467289
      )
  
  )
  </code></pre>
  
  <p>I wish to loop through and remove these null values and combine the Email and Phone Number into Info end up with an array which resembles</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
      (
          [0] =&gt; Name
          [1] =&gt; Info
  
      )
  
  [1] =&gt; Array
      (
          [0] =&gt; Mick
          [1] =&gt; mick@mick.com + 01234 324234
      )
  
  [2] =&gt; Array
      (
          [0] =&gt; james
          [1] =&gt; james@james.com
      )
  
  [3] =&gt; Array
      (
          [0] =&gt; reg
          [1] =&gt; reg@reg.com + 10293 467289
      )
  
  )
  </code></pre>
  
  <p>Here is my current script, I am recienving the error;</p>
  
  <pre><code>&lt;b&gt;Warning&lt;/b&gt;:  array_filter() expects parameter 2 to be a valid callback, no array or string given in &lt;b&gt;C:\Users\Lydia\Documents\XAMPP\htdocs\CSV.php&lt;/b&gt; on line &lt;b&gt;21&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>every time that I loop through the changeRow() function, any help greatly appreciated</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;?php
  include 'CSV.php';
  header('Content-type: text/plain');
  
  $file = read_csv('Book1.csv');
  
  $input = changeRow($file);
  </code></pre>
  
  <p>CSV.php
  ....
  ....</p>
  
  <pre><code>    function changeRow($rows){
  
      $len = count($rows);
  
      for($i = 0; $i &lt; $len; $i++){
  
          $rows = array_filter($rows[0],0);
  
  
  
      }
  
  
  }
  </code></pre>