String 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程

str_getcsv

(PHP 5 >= 5.3.0)

str_getcsv Parse a CSV string into an array

说明

array str_getcsv ( string $input [, string $delimiter [, string $enclosure [, string $escape ]]] )

Similar to fgetcsv() this functions parses a string as its input unlike fgetcsv() which takes a file as its input.

参数

input

The string to parse.

delimiter

Set the field delimiter (one character only). Defaults as a comma.

enclosure

Set the field enclosure character (one character only). Defaults as a double quotation mark.

escape

Set the escape character (one character only). Defaults as a backslash (\)

返回值

Returns an indexed array containing the fields read.

参见


String 函数
php 手册 | 脚本学堂 | 脚本编程 | 网站编程 | 系统管理 | 服务器配置 | 数据库管理 | Php教程 | python教程 | 正则表达式 | 批处理脚本 | Centos教程 | Linux基础教程