Forum Moderators: coopster
while ($row = mysql_fetch_object($db_list)) {
echo $row->Database."\n";
}
?>
but this is output in one line:
nformation_schema amarok mitradb mydb mydb.back.save mysql punbb test y2004 y2005 y2006
echo $row->Database."\n";
Hi i have just started reading php book and here it what is says , hope it clears all your doubts
One mistake often made by new PHP programmers (especially those from a C background) is
to try to break lines of text in their browsers by putting end-of-line characters (“\n”) in the
strings they print. To understand why this doesn’t work, you have to distinguish the output of
PHP (which is usually HTML code, ready to be sent over the Internet to a browser program)
from the way that output is rendered by the user’s browser. Most browser programs will
make their own choices about how to split up lines in HTML text, unless you force a line
break with the <BR> tag. End-of-line characters in strings will put line breaks in the HTML
source that PHP sends to your user’s browser (which can still be useful for creating readable
HTML source), but they will usually have no effect on the way that text looks in a Web page.
To help with that, I created some literal variable strings that make outputing HTML and ASCII in PHP a bit easier:
$cr = chr(13); // 0x0D [\r]
$lf = chr(10); // 0x0A [\n]
$crlf = $cr . $lf; // [\r\n]
$br = '<br>'; // HTML line break
[php.net...]