I have 2 array from data.csv
How can I use while loop to print out both array
I can only print out 1st array and it keep loop same array.
$file = fopen("data.csv","r");
while(!feof($file)){
print_r(fgetcsv($file));
}
fclose($file);
////////////////////////////////////////////////////////////////
$file=fgetcsv($file);
$num=0;
while($num<4){
echo $file[0] . $file[1] . $file[2] . $file[3] . "<br/>";
$num++;
}
////////////////////////////////////////////////////////////
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
)
Array
(
[0] => e
[1] => f
[2] => g
[3] => h
)
Try this to do your task