|
Posted by Ben Ramsey on 10/19/59 11:31
On 11/9/05 9:51 AM, Paul Williams wrote:
> Alright cool that one worked. Do I have to include the curly braces in
> all calls to variables or just the superglobals?
It's not a superglobal issue; it's an array issue -- or, rather, it's an
issue with using quotation marks. You could have also done it this way:
<?php
print <<<EOF
<HTML>
$_SERVER[PHP_SELF]
</HTML>
EOF;
?>
Personally, I put curly braces around all interpolated variables because
it makes it easier for me to read and see the variables, but this is
really up to user preference.
--
Ben Ramsey
http://benramsey.com/
Navigation:
[Reply to this message]
|