SplFileObject::fputcsv
SplFileObject::fputcsv
(PHP 5 >= 5.4.0, PHP 7)
SplFileObject::fputcsv — Write a field array as a CSV line
Description
public int SplFileObject::fputcsv ( array $fields [, string $delimiter = "," [, string $enclosure = '"' [, string $escape = "\" ]]] )
Writes the fields
array to the file as a CSV line.
Parameters
-
fields
-
An array of values.
-
delimiter