Answers for "php read csv file line by line into array"

PHP
1

php read csv file line by line

$file = fopen('file.csv', 'r');
while (($line = fgetcsv($file)) !== FALSE) {
   print_r($line);
}
fclose($file);
Posted by: Guest on August-07-2021
2

php read csv to array

$lines =file('CSV Address.csv');

foreach($lines as $data)
{
list($name[],$address[],$status[])
= explode(',',$data);
}
Posted by: Guest on October-30-2020

Code answers related to "php read csv file line by line into array"

Browse Popular Code Answers by Language