Posted by Rik on 05/23/06 00:28
Jonathan Tremlett wrote:
> I was wondeirng if someone can help me? I am displaying a string on
> screen and all I want to do is make it take a new line.
Manual -> types -> strings
http://nl2.php.net/manual/en/language.types.string.php
Use:
echo "Hello\nworld"
or
echo 'Hello
world';
Also note the newline will appear between <pre> tags in HTML, but normally
you would have to nl2br() your strings to make in viwible in HTML. The
source will have a newline.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|