how to pass comma separated value in new line csv in php 5c

Solutions on MaxInterview for how to pass comma separated value in new line csv in php 5c by the best coders in the world

showing results for - "how to pass comma separated value in new line csv in php 5c"
Jeffrey
24 Mar 2017
1$row = 1;
2if (($handle = fopen("test.csv", "r")) !== FALSE) {
3  while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
4    $num = count($data);
5    echo "<p> $num fields in line $row: <br /></p>\n";
6    $row++;
7    for ($c=0; $c < $num; $c++) {
8        echo $data[$c] . "<br />\n";
9    }
10  }
11  fclose($handle);
12}
13