Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

array fgetcsv(integer file_handle, integer length, string
separator)


The fgetcsv function is used for reading comma-separated data from a file. It requires a
valid file handle as returned by fopen, fsockopen, or popen. It also requires a maximum
line length. The optional separator argument specifies the character to separate fields. If
left out, a comma is used. Fields may be surrounded by double quotes, which allows
embedding of commas and line breaks in fields.


Figure 8-2. fgetcsv.
Free download pdf