Re: Newbie's question about \n
| From: | Tom Rogers | Date: | Mon, 22 Jul 2002 11:12:59 +0000 |
| Subject: | Re: Newbie's question about \n | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108844@lists.php.net to get a copy of this message | ||
Hello KK,
Monday, July 22, 2002, 9:00:47 PM, you wrote:
KL> Dear ALL,
KL> It seems that i have a very silly problem.
KL> I can't get the new line escape character to work.
KL> the following is my SIMPLE script and corresponding output.
KL> PHP script:
KL> <!DOCTYPE HTML PUBLIC
KL> "-//W3C//DTD HTML 4.0 Transitional//EN"
KL> "http://www.w3.org/TR/html4/loose.dtd" >
KL> <html>
KL> <head>
KL> <title>TEST</title>
KL> </head>
KL> <body bgcolor="#ffffff">
KL> <?php
KL> echo "this should be printed out:\n";
KL> echo "this is a second line";
KL> ?>
KL> </body>
KL> </html>
KL> Output in IE6:
KL> this should be printed out: this is a second line
KL> regards,
KL> KK
The browser will ignore newlines use <br> instead.
to use newlines the text could be enclosed in <pre> text\n more
text\n</pre> tags, but <br> is probably what you need.
--
Best regards,
Tom mailto:trogers@kwikin.com