I think what you're running into is some confusion about newlines.
\n prints a newline in the output, yes. But since HTML ignores most
whitespace (which includes \r and \n, you need to add a <br> tag as
well.
On Apr 13, 2008, at 1:08 PM, Bryan wrote:
one more question.... <br> makes a new line, and \n APPEARS to do
nothing.
do I even need to bother with the \n? (see, line 3 I didn't put the
\n and
still got the blank line, so is there any situation where the \n
would NEED
to be there?)
I did the following:
<?php
print "line 1 br br nl <br><br>\n";
print "line 2 br nl <br>\nline 3 br <br>";
print "line 4 nl \n";
print "line 5 br <br>";
?>
------and the output was
line 1 br br nl
line 2 br nl
line 3 br
line 4 nl line 5 br
[Index of Archives]
[PHP Users]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[Postgresql]
[PHP Books]
[PHP Databases]
[PHP SOAP]