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 import_csv($csv_file_path) { $csv_array = array_map('str_getcsv',file($csv_file_path)); unset($csv_array[0]); foreach($csv_array as $csv) { // do something with the CSV } }

Questions about programming?Chat with your personal AI assistant