Hi
Im trying to write a csv file with php, but one of the fields contains commas and they need to be escaped.
I thought you could escape them for excel by enclosing them in double quotes but the quotes just show up as characters and the commas arent escaped
I am using this to add the double quotes
$csv_address='"' . $address . '"';
any ideas?
$fp = fopen("file.csv", 'w');
fwrite($fp, "NAME, JOB, COMPANY, ADDRESS, TEL, EMAIL, PCs, REGDATE\n");
$csv_address='"' . $address . '"';
fwrite($fp, "$title $firstname $lastname, $job, $company, $csv_address, $tel, $email, $pcs, $regdate\n");