Home > Article > Backend Development > How to read csv files and output them in php_PHP tutorial
This article describes the method of reading and outputting csv files in php. Share it with everyone for your reference. The specific implementation method is as follows:
<?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++; } } ?>
I hope this article will be helpful to everyone’s PHP programming design.