This is a discussion on Global array usage? within the PHP General forums, part of the PHP Programming Forums category; This is probably one of the dumbest and simplest questions but I just can't find an answer. I have ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is probably one of the dumbest and simplest questions but I just can't
find an answer. I have the following line in my PHP file: $version['index.php'] = "0.00.000"; I want to access that variable from inside a function. How is this done? I've tried the following: $GLOBALS[$version['index.php']]; $GLOBALS['version[index.php]]; $GLOBALS['version['index.php']']; $version['index.php']; Please help, thankyou. Regards, Rodney Beck. |
|
|||
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 RaveRod wrote: | This is probably one of the dumbest and simplest questions but I just can't | find an answer. | | I have the following line in my PHP file: | | $version['index.php'] = "0.00.000"; | | I want to access that variable from inside a function. How is this done? | I've tried the following: | | $GLOBALS[$version['index.php']]; | $GLOBALS['version[index.php]]; | $GLOBALS['version['index.php']']; | $version['index.php']; | | Please help, thankyou. | | Regards, | Rodney Beck. | | | $GLOBALS['version']['index.php']; Should be right Kelvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFAN6RZhK3oPN3ytOARAhR/AJ9d3rlMTlkSpRDzX5DZ5lYfB6u8IQCfYr/K vuI8tFvBytPPRTsRCtZcC9w= =xiUJ -----END PGP SIGNATURE----- |
![]() |
| Thread Tools | |
| Display Modes | |
|
|