Advertisement
cd62131

CSV

Feb 18th, 2014
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. <?php
  2. $f = fopen('dat', 'r');
  3. $ignore_first = fgetcsv($f);
  4. for ($row = 1; $row <= 6; $row++) {
  5.   $data = fgetcsv($f);
  6.   echo "{$data[0]} {$data[1]}\n";
  7. }
  8. echo "something\n";
  9. for ($row = 1; $row <= 6; $row++) {
  10.   $data = fgetcsv($f);
  11.   if (!$data) break;
  12.   echo "{$data[0]} {$data[1]}\n";
  13. }
  14. fclose($f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement