So, my code generates a CSV file using PHP's built-in fputcsv
function.
For the delimiter, I use ','
(a comma).
For the enclosure, I use '"'
(a double-quote).
However, when I try something like
fputcsv($file,array('a','b',"long string, with commas",NULL,''),',','"');
it outputs
a,b,"long string, with commas",,
but I would like it to output
"a","b","long string, with commas","",""
Is there an easy way to deal with this, or would I have to write a replacement for fputcsv
?