Hello,
The "\n" has a special mean for PHP and it means that new line. If you
use "\n" in the string without web application, it will mean new line. If
you use "\n" in the string with web application, it will mean new line but
it appears only in the source HTML code. It doesn't apper on the screen. If
you want to enter the new line on the screen in your web applciation, you
can use <br> HTML tag :)
<?php
echo "<b>Turkey is the most beatiful country on the world\n";
echo "You can swim and climb at the same time </b>";
?>
<?php
echo "<b>Turkey is the most beatiful country on the world <br>";
echo "You can swim and climb at the same time </b>";
?>
--
Republic Of Turkey - Ministry of National Education
Education Technology Department Ankara / TURKEY
Web: http://www.haydartuna.net
""Rafal Z"" <rafzio4@xxxxx>, haber iletisinde þunlarý
yazdý:65.41.00219.E8895464@xxxxxxxxxxxxxxx
> Hallo,
>
> I',m new to PHP. I've installed Apache 2.0.59 and PHP 5.2. It's
> functionning, but all strings outputed with Echo shows on the same line,
> even if I include a "\n" at then end of string. Example:
>
> <?php
> Echo "string1";
> Echo "string2";
> ?>
> results in: string1string2 in any browser.
>
> The same result with the following modification:
>
> <?php
> Echo "string1\n";
> Echo "string2";
> ?>
>
> How could I change this behaviour
>
> sincerely
>
> Rafal Z
[Index of Archives]
[PHP Users]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[Postgresql]
[PHP Books]
[PHP Databases]
[PHP SOAP]