Re: About "\n"
| From: | graeme | Date: | Wed, 29 Dec 2004 10:27:54 +0000 |
| Subject: | Re: About "\n" | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25202@lists.php.net to get a copy of this message | ||
Hi,
What the "\n" does is to throw a newline in your source code. So when
the page is displayed look at the source that has been generated you
will see the blank line. This can be useful to make the HTML source
readable. However to get a new line displayed in the browser your need
to use a <br> tag, or equivalent such as a <p> pair.
graeme.
michael@skys.com.cn wrote:
>Hi
>
> I'm new in php, I find the "\n" dosen't work in my machine
>
><HTML>
><HEAD>
><TITLE>
><?php
>echo "Hello World!";
>?>
></TITLE>
></HEAD>
><BODY>
><H1>
>First PHP page
></H1>
><?php
>echo "Hello World!";
>echo "\n";
>echo "Hello World!";
>?>
>
>
></BODY>
></HTML>
>
>
>The result is
>First PHP page
>Hello World! Hello World!
>
>any suggestion??
>
>
>