Re: What am I not understanding about $GLOBALS['myvar'] vs global $myvar?
| From: | Marek Kilimajer | Date: | Thu, 27 Mar 2003 08:46:46 +0000 |
| Subject: | Re: What am I not understanding about $GLOBALS['myvar'] vs global $myvar? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141184@lists.php.net to get a copy of this message | ||
there is no $ in front of GLOBALS ;)
Ernest E Vogelsinger wrote:
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";