O'Reilly logo

Programming PHP, 3rd Edition by Peter MacIntyre, Kevin Tatroe, Rasmus Lerdorf

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

fputcsv

Synopsis

int fputcsv(resource handle[, array fields[, string delimiter[, string enclosure]]])

Formats the items contained in fields in comma-separated values (CSV) format and writes the result to the file handle handle. If supplied, delimiter is a single character used to delimit the values for the line instead of commas. If supplied, enclosure is a single character that is used to enclose values (by default, the double quote character "). Returns the length of the string written, or false if a failure occurred.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required