If you correctly create your CSV file, the comma will not matter. Simply wrap the text for that field in double quotes, and you'll be OK:
field1,field2,"Charles Reace, Jr.",field4
If a CSV field contains double quotes as data, then the field must be quoted and the double quotes within it must be doubled up:
field1,"This field has ""quotes"" in it","This field has, ""quotes and commas,"" in it"
A simple PHP function to deal with this:
function quoteCsvField($value)
{
if(preg_match('/[",]/', $value))
{
$value = '"' . str_replace('"', '""', $value) . '"';
}
return($value);
}
Or, if you're using PHP 5, you can use the [man]fputcsv/man function, which automatically quotes all fields and doubles up double-quotes in the content.