Re: variables.
| From: | Troels Arvin | Date: | Sun, 25 Jun 2000 03:15:55 +0000 |
| Subject: | Re: variables. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2951@lists.php.net to get a copy of this message | ||
Glen Ogilvie <nelg@geocities.com> wrote:
> $test = << "TOSTOP"
> <this is the contence of test
> etc, etc
> <html> "etc"
> etc,
>
> TOSTOP
You are talking about "here documents". PHP 4 supports that, although in
a slightly different way than perl:
http://www.zend.com/tips/tips.php?id=90&single=1
However, I don't really see what's so nice about here-documents. It's
already easy to make multi-line variable assignments without using the
bizarre here-document syntax:
$a='
Hey You,
<br>the rock steady
<br>crew
';
Also, you have the possibility to "break out" of PHP for a moment:
<?php
if ($something) {
?>
a
lot
of
bla-bla
<?php
} else {
?>
other bla-bla
<?php
}
?>
--
Greetings from Troels Arvin, Copenhagen, Denmark