title: php looping through tab separated file
body: <p>this code works great. The only thing i can figure out how to do is convert this to an array. I have 26 to 38 rows (that number varies) what i would like to do is have it turn each row of results into its own array.</p>
  
  <pre><code> $row[1] col1, col3, col4, col5, col8
   $row[2] col1, col3, col4, col5, col8
   $row[3] col1, col3, col4, col5, col8
  </code></pre>
  
  <p>I then want to be able to access each result like this: echo $row[1]; How can i do this and how do i know when the row ends?</p>
  
  <pre><code>&lt;?php     
  $a = file_get_contents( "t_rac.txt" ); 
  $a = str_replace( array( "\r\n" , "\t" ) , array( "[NEW*LINE]" , "[tAbul*Ator]" ) , $a ); 
  foreach( explode( "[NEW*LINE]" , $a ) AS $lines ) {  
      foreach( explode( "[tAbul*Ator]" , $lines ) AS $li ) { 
      if (strpos($li,',') !== false) 
      {
      }
      else {
      echo $li; 
      }
      echo "&lt;br&gt;";
      }  
  } 
  ?&gt;
  </code></pre>