Home >Backend Development >PHP Tutorial >How to read csv files and output them in php_PHP tutorial
The example in this article describes how to read and output 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.