RE: [PHP] How to access arrays from $GLOBAL?
| From: | Ford, Mike [LSS] | Date: | Wed, 13 Mar 2002 18:01:39 +0000 |
| Subject: | RE: [PHP] How to access arrays from $GLOBAL? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-88380@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Richard Davey [mailto:rich@fatal-design.com]
> Sent: 13 March 2002 17:12
>
> "Rasmus Lerdorf" <rasmus@lerdorf.ca> wrote in message
> news:Pine.LNX.4.44.0203130851580.12337-100000@christine.ca...
> > I don't understand why you think it is illogical. How else
> would you
> > dereference a multi-dimensional array?
>
> 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"
But $GLOBALS['mtxt'] *is* the mtxt array -- so logically element 1 of it can only be
$GLOBALS['mtxt'][1].
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211