Re: \n \t don't work!!!
| From: | Marek Kilimajer | Date: | Mon, 13 Oct 2003 11:57:50 +0000 |
| Subject: | Re: \n \t don't work!!! | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165960@lists.php.net to get a copy of this message | ||
Wang Feng wrote:
The page source shows: ************************************ <html><body></body></html> ************************************The problem might be right here --------------+
(closing html tag) |<head><title>Hello World Program</title></html> <body> <?php echo ("this is the simplest, an SGML processing instruction\n"); echo "This spans multiple lines. The newlines will be output as well"; echo "This spans\nmultiple lines. The newlines will be\noutput as well."; ?> </body> </html> ****************************************** Simple: <html> <head><title>Hello World Program</title> <body> <?php echo ("this is the simplest, an SGML processing instruction<br>"); echo "This spans<br>multiple lines. The newlines will be<br>output as well"; echo "This spans<br>multiple lines. The newlines will be<br>output as well."; ?> </body> </html> In html you cannot use newlines for formating, use <br> if you need newline. You can use <pre> tag for preformated text however.<html> |
So, what's the problem here? cheers, feng