On Wed, 2003-03-05 at 14:52, Chris Hayes wrote: > At 13:35 5-3-03, you wrote: > > can you assign global value in a class like: > > > >class test{ > > > >global $arr; > > > >} > > > >anyone? > try! :) > if it does not work in this place, try setting it in the constructor > function, which is a function in the class with the same name as the class, > > > >class test{ > >var $test_arr; > > function test() > { /* > gobal $arr; > $this->test_arr=$arr; > //or maybe even > $this->test_arr=&$arr; */ $this->text=&$GLOBALS['arr']; /* I guess this dose the job better ... when you declare global $arr you do $arr=&$GLOBALS['arr'] and there is no need to do a double reference! */ > } > > > >} -- Mincu Alexandru intelinet.ro Tel:+4 0745 369719 +4 021 3140021 www.intelinet.ro [EMAIL PROTECTED]
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php