I have a CSV with the first row containing the field names. Example data is...
\"Make\",\"Model\",\"Note\" \"Chevy\",\"1500\",\"loaded\" \"Chevy\",\"2500\",
Try this
$csv = array_map("str_getcsv", file('file.csv', FILE_SKIP_EMPTY_LINES)); $header = array_shift($csv); // get header from array foreach ($csv as $key => $value) { $csv[$key] = array_combine($header, $value); var_dump($csv[$key]['Model']); } var_dump($csv);