RE: [PHP] echo
| From: | Mike | Date: | Tue, 30 Nov 2004 20:25:58 +0000 |
| Subject: | RE: [PHP] echo | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-203181@lists.php.net to get a copy of this message | ||
How are you running the file? If it's in a web browser, you won't see the
new lines since you'd need <br> or <p> tabs instead of \n's.
So when you say that it's not working properly, can you at least say how it
*is* working and how that's different from what you expect?
-M
> -----Original Message-----
> From: Christopher Weaver [mailto:booktues@yahoo.com]
> Sent: Monday, November 29, 2004 9:20 PM
> To: php-general@lists.php.net
> Subject: [PHP] echo
>
> I can't get this code, pasted from the documentation, to work
> properly. The new lines don't occur where they should.
>
> <?php
> echo "Hello World";
>
> echo "This spans
> multiple lines. The newlines will be
> output as well";
>
> echo "This spans\nmultiple lines. The newlines will
> be\noutput as well.";
>
>
> echo <<<END
> This uses the "here document" syntax to output multiple lines
> with $variable interpolation. Note that the here document
> terminator must appear on a line with just a semicolon. no
> extra whitespace!
> END;
>
>
> ?>
>
> Any help will be greatly appreciated.
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>