I am exporting from a mysql database to CSV.
It all works great except that if there are any rogue commas in the code it jumps to the next column in the csv file(obviously).
Can i check for a comma in the variable i'm passing before hand and make it invisible to the csv??
Thanks in advance, Hugh
I'm certain you should use the preg_replace() function. e.g.
$replace_chr = "^"; $data = preg_replace(",",$replace_chr,$data_from_mysql);
Thanks for your help, i came to the same conclusion myself, although i still can't find a way to keep the comma in the file, just ignore it when it comes to skiping columns.
I'm not sure it can be done.
Thanks, Hugh