September 2001
Intermediate to advanced
768 pages
32h 45m
English
array fgetcsv(resource file_handle, int length, [string delimiter])
| file_handle | File handle |
| length | Number of characters to read |
| delimiter | Value separator |
Reads data from a CSV (comma-separated value) file.
Returns:
Array; FALSE on error or EOF
Description:
Parses a line from a CSV (comma-separated value) file and returns it in an array. The length parameter must be longer than the longest line present in the source file, including any line-end characters. Each value extracted from the input line is returned as one element in the return array. Empty lines return an empty array.
The function handles quoted values sensibly—ignoring commas within the quote.
When the function reaches the end of the file or encounters an error, FALSE ...
Read now
Unlock full access