SplFileObject
PHP Manual

SplFileObject::getCsvControl

(PHP 5 >= 5.2.0, PHP 7)

SplFileObject::getCsvControlGet the delimiter and enclosure character for CSV

说明

public array SplFileObject::getCsvControl ( void )

Gets the delimiter and enclosure character used for parsing CSV fields.

参数

此函数没有参数。

返回值

Returns an indexed array containing the delimiter and enclosure character.

范例

Example #1 SplFileObject::getCsvControl() example

<?php
$file 
= new SplFileObject("data.txt");
print_r($file->getCsvControl());
?>

以上例程的输出类似于:

Array
(
    [0] => ,
    [1] => "
)

参见


SplFileObject
PHP Manual