Re: [PHP] About Classes and Scope

2004-02-18 Thread Phillip Jackson
u NOPE... i don't believe that nick was looking for a constant - which cannot be changed once defined. there are a few ways to do this - for one, you can declare $var global inside of the function in your class: class myclass{ function myclass(){ global $var; //do some stuff } }

Re: [PHP] About Classes and Scope

2004-02-18 Thread Nick Wilson
* and then Nick Wilson declared > $myconfig=TRUE; > > class myclass { > > if($myconfig) { > var $something=1; > } > } > > I know that that is not the way it should be done though. What is the > best way to do this? On a hunch, i think i've found the answer: http://www.php.