Re: About "\n"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx 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??
>
>  
>

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux