PHP str_getcsv()関数
定義と使用法
str_getcsv()関数は、CSV形式のフィールドの文字列を解析し、読み取られたフィールドを含む配列を返します。
構文
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 (\) |
技術的な詳細
戻り値: | 配列内のCSVフィールドを返します |
---|---|
PHPバージョン: | 5.3.0+ |
❮PHP文字列リファレンス