SplFileObject
PHP Manual

SplFileObject::getCsvControl

(PHP 5 >= 5.2.0, PHP 7)

SplFileObject::getCsvControlGet the delimiter, enclosure and escape character for CSV

설명

public array SplFileObject::getCsvControl ( void )

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

인수

이 함수는 인수가 없습니다.

반환값

Returns an indexed array containing the delimiter, enclosure and escape character.

변경점

버전 설명
5.6.25, 7.0.10 Added the escape character to the returned array.

예제

Example #1 SplFileObject::getCsvControl() example

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

위 예제의 출력 예시:

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

참고


SplFileObject
PHP Manual