I'm doing a basic export and there are some either new lines or hidden characters mucking it all up. Any ideas?
while ($row = mysql_fetch_row($res)) {
$row[18]=str_replace("\r"," ",$row[18]);
$row[18]=str_replace("\n"," ",$row[18]);
$row[8]=str_replace("\r"," ",$row[8]);
$row[8]=str_replace("\n"," ",$row[8]);
$row[9]=str_replace("\n"," ",$row[9]);
$row[9]=str_replace("\r"," ",$row[9]);
$row[21]=str_replace("\r"," ",$row[21]);
$row[21]=str_replace("\n"," ",$row[21]);
// check to see if a comma exists in the field
// $variable = str_replace("\,", "", $row);
fwrite($fp, join($delim, $row) . "\n");
}
TNX!