Re: [PHP-INSTALL] Help!

[email protected] (Doug Tabacco)
Newsgroups php.install
Message-ID <[email protected]>
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
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.