[eluser]alberto24[/eluser]
Hi - happy new year to all CI people!
I am running into a big issue with my app - I have a function that creates a csv file of data in the database. Sometimes the data in the database field is:
Professor, Economics
When the comma is in the field of data, and then the file is exported, the comma screws up the file and pushes Economics out to the next field.
Any ideas on how to fix this? I tried using a pipe as a delimiter but then Excel doesn't understand how to handle the file on simple open - I am dealing with mostly very basic computer users so I'd prefer to stick to the comma.
Here's a snippit of the code:
Code:
foreach ($result->result() as $vcard)
{
$data .= $vcard->f_name . ",";
$data .= $vcard->l_name . ",";
}
force_download($name, $data);
Thank you in advance