By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

Adding values to a superglobal array

P: n/a
Hi,
i have a variable (well, an Object) which is needed in beneath every Script.
it's not needed to be changed during the whole script, so i like to access
it easyli without passing by or declare it as global in every function.
afaik it isnt possible to set a variable to superglobal.
Is there any reason why i shouldn't add it to the _SERVER array or any other
superglobal?

Thanks
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

On 9-Sep-2003, "Rainer Erismann" <er******@ivp.bepr.ethz.ch> wrote:
i have a variable (well, an Object) which is needed in beneath every
Script.
it's not needed to be changed during the whole script, so i like to access
it easyli without passing by or declare it as global in every function.
afaik it isnt possible to set a variable to superglobal.
Is there any reason why i shouldn't add it to the _SERVER array or any
other
superglobal?


Why don't you use $GLOBALS? That's what it's for.

--
Tom Thackrey
www.creative-light.com
Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.