[nycphp-talk] Can code be executed in a heredoc?
kevin c smith
ksmith at centricle.com
Tue Feb 17 22:08:39 EST 2004
On 2004-02-17 @ 12:11 AM -0500, webapprentice at mail.com wrote:
> The example below is what I was trying to do. Instead, PHP
> displayed the if statement as text.
Weird. The following gives me a parse error, not the literal text:
<?
echo <<< FOO
$_SERVER['PHP_SELF']
FOO;
?>
...but, this displays the contents of $PHP_SELF:
<?
echo <<< FOO
{$_SERVER['PHP_SELF']}
FOO;
?>
Aside from personal preference, is there a compelling reason to kick
back out to HTML, as Hans suggests?
--
kevin c smith
http://centricle.com
More information about the talk
mailing list