On Thursday 25 July 2002 12:11, Wormy . wrote:
> Dear all,
> this sounds like a silly problem but i really dunno how to fix it!
>
> In the php manual on php.net said we can use an embedded newline just
> by writing the string on different line by pressing "enter" key. This
> doesn't work for me. Another thing is \n also work. For example:
>
> <?php
> echo ' You can also have embedded newlines in strings,
> like this way.';
> echo 'I am trying to include at this point: \n a newline';
> ?>
>
> the output i get is:
> "You can also have embedded newlines in strings, like this way.I am trying
> to include at this point: \n a newline"
>
> Am I doing anything wrong? Thanks!
Stuff like \n are only interpreted if they are enclosed in double-quotes:
"This works\n"
'This does not work\n'
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Iron Law of Distribution:
Them that has, gets.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php