fputcsv
Format line as CSV and write to file pointer
&reftitle.description;
intfalsefputcsv
resourcehandle
arrayfields
stringdelimiter","
stringenclosure'"'
stringescape_char"\\"
fputcsv formats a line (passed as a
fields array) as CSV and writes it (terminated by a
newline) to the specified file handle.
&reftitle.parameters;
handle
&fs.validfp.all;
fields
An array of strings.
delimiter
The optional delimiter parameter sets the field
delimiter (one character only).
enclosure
The optional enclosure parameter sets the field
enclosure (one character only).
escape_char
The optional escape_char parameter sets the
escape character (at most one character).
An empty string ("") disables the proprietary escape mechanism.
If an enclosure character is contained in a field,
it will be escaped by doubling it, unless it is immediately preceded by an
escape_char.
&reftitle.returnvalues;
Returns the length of the written string &return.falseforfailure;.
&reftitle.changelog;
&Version;
&Description;
7.4.0
The escape_char parameter now also accepts an empty
string to disable the proprietary escape mechanism.
5.5.4
The escape_char parameter was added
&reftitle.examples;
fputcsv example
]]>
The above example will write the following to file.csv:
&reftitle.notes;
¬e.line-endings;
&reftitle.seealso;
fgetcsv