Return to Snippet

Revision: 4780
at January 20, 2008 22:17 by coggla

Initial Code
$read = fopen($textfile,"r");
$file = fread($read,filesize($textfile));

$lines = explode ("\n", $file);

foreach ($lines as $line) { 
  list($a,$b,$c,$d) = explode(',',$line);
  echo "$a $b $c $d";

Initial URL

Initial Description
Open a comma delimited text file then read each line and break apart by delimiter

Initial Title
Files - Opening & Reading

Initial Tags

Initial Language