How PHP reads data from a CSV file and outputs it to a Web page,
This example describes how PHP reads data from a CSV file and outputs it to a Web page. Share to everyone for your reference. The implementation method is as follows:
<?PHP$FP = fopen (' sample.csv ', ' r ') or Die ("can ' t Open file");p rint "
\ n ";" while ($csv _line = Fgetcsv ($fp)) { print '
'; for ($i = 0, $j = count ($csv _line); $i < $j; $i + +) { print '
'. Htmlentities ($csv _line[$i]). ' | '; } Print "
\ n ";} print '
\ n '; fclose ($fp) or Die ("can ' t close file");? >
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/967736.html www.bkjia.com true http://www.bkjia.com/PHPjc/967736.html techarticle how PHP reads data from a CSV file and outputs it to a Web page, this example describes how PHP reads data from a CSV file and outputs it to a Web page. Share to everyone for your reference. Concrete implementation of the party ...