Hi all,
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?
I have tried:
$text = $GLOBALS["mtxt[1]"];
$text = $GLOBALS["{mtxt[1]}"];
But both fail too.
Cheers,
Richard
--
Fatal Design
http://www.fatal-design.com
Atari / DarkBASIC / Coding / Since 1995
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php