PHP str_getcsv() Function
Definition and Usage
The str_getcsv() function parses a string for fields in CSV format and returns an array containing the fields read.
Syntax
str_getcsv(string,separator,enclosure,escape)
Parameter | Description |
---|---|
string | Required. Specifies the string to parse |
separator | Optional. A character that specifies the field separator. Default is comma ( , ) |
enclosure | Optional. A character that specifies the field enclosure character. Default is " |
escape | Optional. A character that specifies the escape character. Default is backslash (\) |
Technical Details
Return Value: | Returns the CSV fields in an array |
---|---|
PHP Version: | 5.3.0+ |
❮ PHP String Reference