Method 1:
<?php $row = 0; $j = 1; // Linea por la que quieres empezar $file = "name.txt"; //Nombre del fichero if (($handle = fopen($file, "r")) !== FALSE) { while (($data = fgetcsv($handle, ",")) !== FALSE) { print_r($data); $j++; $row++; } } ?>
Method 2:
$fh = fopen("contacts.csv", "r"); while($line = fgetcsv($fh, 1000, ",")) { echo "Contact: {$line[1]}"; }
The above is the entire content of this article, I hope you all like it.