PHP's own function fputcsv can be used to print the report (Excel) function. If your report format requirements are not very high, then fputcsv is a good choice. It performs efficiently and does not require a third-party library, which is convenient
This article mainly introduces how to read and write data using the fputcsv () function csv file in php, and analyzes the skills of the fputcsv () function for reading and writing csv files, which has some reference value, for more information,
PHP uses the Fputcsv () function CSV file to read and write data,
This example describes how PHP uses the Fputcsv () function CSV file to read and write data. Share to everyone for your reference. The specific analysis is as follows:
The Fputcsv ()
This article mainly introduces how to read and write data using the fputcsv () function csv file in php, and analyzes the skills of the fputcsv () function for reading and writing csv files, which has some reference value, for more information about
PHP tutorial Fputcsv () function CSV data read/write database tutorial file code
The Fputcsv () function is used to format the data in CSV format for writing to a file or database.
1. Writing a string to the CSV file
$test _array = Array
Command: Fputcsv ()
Command format: int fputcsv (resource handle [, array fields [, String delimiter [, String enclosure]])
Command parsing: fputcsv () formats a row (passed in the fields array) in CSV format and writes the file specified by handle.
Command: Fputcsv ()
Command format: int fputcsv (resource handle [, array fields [, String delimiter [, String enclosure]])
Command parsing: fputcsv () formats a row (passed in the fields array) in CSV format and writes the file specified by handle.
This example describes the way PHP uses the Fputcsv () function CSV file to read and write data. Share to everyone for your reference. The specific analysis is as follows:
The Fputcsv () function is used to format data in CSV format for writing to
Php tutorial fputcsv () function csv data read/write database tutorial File Code
The fputcsv () function is used to write data into a file or database in csv format.
1. Write the string to the csv file.
$ Test_array = array (Array ("111", "sdfsd"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.