Re: How to access arrays from $GLOBAL?
| From: | bvr | Date: | Fri, 15 Mar 2002 17:19:00 +0000 |
| Subject: | Re: How to access arrays from $GLOBAL? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88677@lists.php.net to get a copy of this message | ||
Maybe it makes sense to you like this:
$mtxt = $GLOBALS['mtxt'];
$mtxt === $GLOBALS['mtxt']
$mtxt[1] === $GLOBALS['mtxt'][1]
bvr.
hmm.. the '===' operator, now that's weird ;)
Because in my mind (which I know is totally wrong in this instance, I'm just explaining for your benefit) using:$GLOBALS['mtxt'][1];is like saying "give me element 1 of the globals array" when I was thinking "but I want element 1 of the mtxt array" which is why I tried the various combinations of mtxt[1] _inside_ of the globals[].Hope that explains a little.