There are a few ways to read CSV files with PHP. I used to use the explode function to put each line into an array and then explode commas and use trim
This converts the CSV into a nested array. Might be easier for you to deal with:
0)
{
// This is a row in the CSV that needs to be stored in the return array
$csv_array[] = csv_entry_to_array($row);
}
$row_counter++;
}
// Close file handler
fclose($handle);
}
else
{
// Input file: some error occured
return array();
}
return $csv_array;
}