I'm outputting MySQL results to the screen in CSV format.
But instead of creating a new line, it sticks the results into one long line and you can see the \n on the screen.
Any help appreciated.
Thanks
But instead of creating a new line, it sticks the results into one long line and you can see the \n on the screen.
Any help appreciated.
Thanks
Code:
<?php
include("connect.php");
$q = "select appliance,rating from $table";
$rs = mysql_query($q) or die("Problem with the query [$q]<br>" . mysql_error());
while ($rw = mysql_fetch_assoc($rs))
{
// By doing this in stages its easier to read
$temp_value = implode(',',$rw);
echo '' .$temp_value. '\n';
}
?>