Definition and usage
The str_getcsv() function parses the string of CSV format fields and returns an array containing the fields read.
grammar
str_getcsv( string,separator,enclosure,escape )
parameter | describe |
---|
string | Required. Specifies the string to be parsed. |
separator | Optional. Set field delimiter (only one character allowed), default value is comma (,). |
enclosure | Optional. Set field wrap character (only one character allowed), default is double quotes ( " ). |
escape | Optional. Sets the escape character (only one character is allowed), the default is backslash ( ). |
technical details
Return value: | Returns CSV fields as an array. |
---|
PHP version: | 5.3.0+ |
---|