Re: What am I not understanding about $GLOBALS['myvar'] vs global $myvar?
| From: | Ernest E Vogelsinger | Date: | Thu, 27 Mar 2003 08:31:46 +0000 |
| Subject: | Re: What am I not understanding about $GLOBALS['myvar'] vs global $myvar? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141183@lists.php.net to get a copy of this message | ||
At 09:24 27.03.2003, Marek Kilimajer said:
--------------------[snip]--------------------
>echo "GLOBALS['$key'] = $value<br>\n";
>is right because $key is in double quotes (the outermost qoutes)
--------------------[snip]--------------------
...almost... the array deref should be in curly quotes then:
echo "{GLOBALS['$key']} = $value<br>\n";
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/