PHP function fputcsv()

Availability in versions: PHP 5.1.0

Format line as CSV and write to file pointer

Parameters

Parameter Data type Default value Note
$handle resource not
$fields array not An array of values.
$delimiter string ",", The optional delimiter parameter sets the field delimiter (one character only).
$enclosure string '"', The optional enclosure parameter sets the field enclosure (one character only).
$escape_char string "\"

Return values

int

|bool the length of the written string or false on failure.

Other resources

Official fputcsv documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.