Re: Using the echo tag...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux