I am retrieving some numerical values separated by commas. I get the error,
Parse error: syntax error, unexpected ';' in C:\wamp\www\viraj work old\fileread.php on line 6. Why is this so?
<?php
$filename = "C:/numbers.txt";
$newfile = @fopen($filename, "r") or exit("Could not open file");
$file_contents = @fgetcsv($newfile, filesize($filename),",") or exit("Could not read file contents");
while ($i = 0; $i < sizeof($file_contents); $i++)
{
echo $file_contents[$i];
echo "<br/>";
}
fclose($newfile);
?>
Thanks