PHP str_getcsv() Function
Definition and Usage
The str_getcsv() function parses a CSV formatted string and returns an array containing the fields read.
Syntax
str_getcsv(string,separator,enclosure,escape)
Parameter |
Description |
string |
Required. Specifies the string to be parsed. |
separator |
Optional. Character, specifies the field separator (only one character is allowed). The default value is the comma (,). |
enclosure |
Optional. Character, specifies the field enclosure character. The default value is the double quote ("). |
escape |
Optional. Character, specifies the escape character. The default is the backslash (\). |
Technical Details
Return Value: |
Returns CSV fields in array form. |
PHP Version: |
5.3.0+ |