I've got a csv with column headers: description, stock, mfgid (and some other headers I don't need).
I need to get the data from the column headers stock and mfgid in an array.
I was using fgetcsv() but it was putting the entire row into an exclusive key in the array.
found this here at stackoverflow but can't get it to work right:
$file = fopen('inventory.csv', 'r');
while (($line = fgetcsv($file)) !== FALSE) {
//$line is an array of the csv elements
print_r($line);
}
fclose($file);