> -----Original Message----- > From: Richard Davey [mailto:[EMAIL PROTECTED]] > Sent: 13 March 2002 16:02 > > I have a global array $mtxt that is created in my script. > I have a function from which I want to access a value from that array: > > $mtxt[1] = "Test"; > $text = $GLOBALS['mtxt[1]']; > > Except that gives me the Warning "Undefined index"; > > I can use $GLOBALS['mtxt'] to access a global variable > without an error, > just not a specific element of a global array. > Does anyone know the correct syntax for this?
$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: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php