faqts : Computers : Programming : Languages : PHP : Not Quite PHP : HTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 26 people (65%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

Why does echo("help\n") not create a newline?

May 2nd, 2000 10:44
Henrik Hansen, David Fallon, Lee Engler, Nathan Wallace,


echo("help\n"); will echo a newline, but it won't show up as the 
newlines are ignored by html. Try writing the string to a file, or echo
("A\nB"); then view source, you'll see
A
B
If you want to add a new line after a line, use something like:
echo "help<br>";
which will send a html line break, which will result in a new line.