I am trying to read a csv
file (delimited by commas) but unfortunately, it isn't responding as it ought to. I am not so sure what I am doing wrong here, but I'll paste out the contents of the code and the CSV
file both :
$row = 0;
if($handle = fopen("SampleQuizData.csv","r") !== FALSE)
{
// WORKS UNTIL HERE, SO
FILE IS BEING READ
while(!feof(handle)){
$line = fgetcsv($handle, 1024, ",") ;
echo $line[2]; // DOES NOT WORK
}
}
And the CSV
file is (the emails and names have been changed here to protect the identities of the users)
parijat,something,
[email protected]
matthew,durp,
[email protected]
steve,vai,
[email protected]
rajni,kanth,
[email protected]