generate functionFri, 27 Jan 2023

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; }

Want to kickstart your project?Use the new AI Studio to create your code