What you're looking for seems to be called the 'here document' syntax.
I've always seen it used with print and there's a reference to it in the
print function (okay, construct) PHP documentation, but a quick test
shows that you can also use it to assign to variables. As follows:

$var = <<<END
Several lines
of text would
go here.

Perl only uses two brackets (IIRC) for the same functionality.


On Thu, 2002-08-29 at 10:42, Mike richardson wrote:
> I've been searching for this old php feature (perhaps it was
> deprecated), and can't get the right keywords to look it up.
> There was a way, similar to the perl method shown below, to set multiple
> lines of data equal to a variable.
> (in perl)
> $variable = __SOME_HEADER_HERE__
> Put whatever is desired here, including $variables.
> Just end it with this:
> Anyone know what this is for PHP?
> Best wishes
> Michael Richardson
> Web Developer
> (520) 529-2000
> ========================
> //   http://www.mdausa.org       //
> ========================
> ..very few phenomena can pull someone out 
> of Deep Hack Mode, with two noted exceptions: 
> being struck by lightning, or worse, your *computer*
> being struck by lightning.
>         -- Matt Welsh

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to