LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Doug Tabacco Date: Sun Apr 13 13:22:15 2008 Subject: Re: Help!
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 > > >
| Navigate in group php.install at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |