Re: assign gobal values in class?
| From: | Chris Hayes | Date: | Wed, 05 Mar 2003 12:52:57 +0000 |
| Subject: | Re: assign gobal values in class? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138257@lists.php.net to get a copy of this message | ||
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; }
}