import csv from local file and put values into an array, remove header line, and loop through the array
function readCsv($fileName) { $file = fopen($fileName, 'r'); $header = fgetcsv($file); while($row = fgetcsv($file)) { $rows[] = $row; } fclose($file); return $rows; }