1 Temmuz 2007 Pazar

Reading a TAB Delimited File

$filename = "Book1.txt";
$fd = fopen($filename,"r");
$contents = fread ($fd,filesize ($filename));
fclose($fd);

$splitcontents = explode(" ", $contents);
$counter = 0;

foreach($splitcontents as $data)
{
echo $counter++;
echo ": " . $data;
}


0 Comments: