I have a csv file which looks like this
$lines[0] = \"text, with commas\", \"another text\", 123, \"text\",5; $lines[1] = \"some without commas\", \"another
you can read the data using the following function.
function readCSV() { $csv = array_map('str_getcsv', file('data.csv')); array_shift($csv); //remove headers }
http://www.pearlbells.co.uk/how-to-sort-a1a2-z9z10aa1aa2-az9az10-using-php/