I've searched other questions to get me this far, but I'm missing a key element to make my code work.
The csv file is formatted as:
job;customer;location;tech;side
Ex(12345;company;floor 1;John;Auto)
Below is my current function:
function readCSV($csvFile,$side){
$file_handle = fopen($csvFile,'r');
while (!feof($file_handle)) {
$line_of_text[] = fgetcsv($file_handle, 1024,';');
}
fclose($file_handle);
return $line_of_text;
}
I want the function to only load the records that match the $side parm. (Example: Drive side, or Auto side)
Thanks in advance, I'm new to whole gathering data from csv.