Re: Globals

From: Date: Thu, 28 Dec 2000 19:34:13 +0000
Subject: Re: Globals
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32132@lists.php.net to get a copy of this message
Agreed and with regards to manual : PHP Manual : Variable scope http://www.php.net/manual/language.variables.scope.php Philip On Thu, 28 Dec 2000, jeremy brand wrote: > Basically, if you want to use a variable in your main code, outside of > any functions withing any functions, you have to say: > global $var; // (where $var is the name of a variable you want to > // use withing that function) > inside of any function you want to use it in. This makes it so that > you can't accidentally change global vars inside of functions without > knowing it. > > Jeremy > > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for > more > Get your own Free, Private email at http://www.smackdown.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "<body>" -- Quoted from Yahoo! homepage, > http://www.yahoo.com > > On Thu, 28 Dec 2000, Richard Kurth wrote: > > > Date: Thu, 28 Dec 2000 11:27:30 -0800 > > From: Richard Kurth <rkurth@pacifier.com> > > To: "php-general@lists.php.net" <php-general@lists.php.net> > > Subject: [PHP] Globals > > > > Could somebody explain using globals to me and maybe were I can find > > info about them in the manual I have looked and can not find anything > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#32132) next »