title: Loop read each line of a file to its own array
body: <p>I have a text file, it can vary in number of lines, but will always have 24 tab deliberated entries on each line. </p>
  
  <p>4 of these entries are dates, but they're not in the normal YYYY-MM-DD format example: "2013-03-11T20:35:33+00:00" so I use substr and thats all fine. However currently I pass all the data from the file to a table then take each date do the substr and UPDATE the fields, to then pass all this table to another but with the date field types as "DATE" as first time round they can't due to "2013-03-11T20:35:33+00:00".</p>
  
  <p>The point I'm getting at is, I'd like to read each line into an array apply the substr to the dates which will always be in the same position then, pass the array into the table, so the data type for the column can be DATE from the get go.</p>
  
  <p>I just can't seem to figure out how to loop round for each line in the file. I can get the first line (as I need to delete that), I've read that getting a specific line is impossible or hard but I just need it to loop through them periodicity. </p>
  
  <p>I currently have </p>
  
  <pre><code>while ($DateRow = mysql_fetch_array($DateQuery, MYSQL_ASSOC))
  </code></pre>
  
  <p>which loops for each row in the table but I don't know how or if this can be implimented for the file lines.</p>
  
  <p>Many thanks.</p>