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 comma (,). |
Enclosure |
Optional. Character, specifies the field encapsulation character. The default value is double quotes ("). |
Escape |
Optional. Character, specifies the escape character. The default is backslash (\). |
Technical Details
Return Value: |
Returns CSV fields in array form. |
PHP Version: |
5.3.0+ |