I know fputcsv() is the best way for dealing with exporting to CSV, but I'm currently doing a quick modification to a PHP CSV export script, and the client doesn't want to change how it's being handled. (wants it fast!)
So right now, an array of the data is manually being created, each item manually enclosed in double-quotes, and added to the CSV file.
My question is, if you have data which already contains double quotes (i.e. "and he said "Yes""), then whats the best way of dealing with that? The extra quotes seem to break the CSV file.
htmlspecialchars($text)export the text with quotes without breaking the code