My CSV file is not working properly, certain rows are not in the right column. I found out that record with comma (,) was placed in the next column. For example I have this record:

Fruits Price Quanity
Kiwi 50 2 pcs
Apple, Green 50
1pc

Instead of having Apple,Green in the fruit column, the green was placed in the next column.
I guess it has something to do with the comma. Can someone please help me?
Thanks in advance.

by the way, I have this code:

$query = "$qselect $qwhere $qgroup";
$result = mysql_query($query) or die(mysql_error());

if (mysql_num_rows($result) > 0) {
while ($row = mysql_fetch_row($result)) {

//number of columns in the query
for ($j = 0; $j < 7; $j++) {
$csv_output .= $row[$j] . ",";
}
$csv_output .= "\n";
}
}

$filename = $file."_".date("Y-m-d_H-i",time());

header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");

print $csv_output;
exit;