PHP str_getcsv () function
Definition and Usage
str_getcsv () function parses CSV format field of string and returns an array of the read field contains.
grammar
str_getcsv( string,separator,enclosure,escape )
参数 | 描述 |
---|---|
string | 必需。规定要解析的字符串。 |
separator | 可选。设置字段分界符(只允许一个字符),默认值为逗号( , )。 |
enclosure | 可选。设置字段环绕符(只允许一个字符),默认值为双引号( " )。 |
escape | 可选。设置转义字符(只允许一个字符),默认值为反斜线( \ )。 |
technical details
return value: | Returns an array of CSV field. |
---|---|
PHP version: | 5.3.0+ |
PHP String Reference