Global array usage?

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-04-2004
RaveRod
 
Posts: n/a
Default Global array usage?

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.



Reply With Quote
  #2 (permalink)  
Old 02-21-2004
Kelvin Mackay
 
Posts: n/a
Default Re: Global array usage?

-----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-----
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:40 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0