Re: Classes within classes (Should I do this?)
| From: | Yasuo Ohgaki | Date: | Wed, 05 Dec 2001 11:05:06 +0000 |
| Subject: | Re: Classes within classes (Should I do this?) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-76695@lists.php.net to get a copy of this message | ||
Cameron Just wrote:
Hi, Is this a bad thing to do have a class stored within another class? I would also like to store an array of another class within a class. It seems to work apart from the fact that I can't reference an array of class directly. ie $test_array[0]->get(); This gives an error.There is nothing wrong storing array of classes in a class. $obj->array_of_obj[0]->method() works. or array of classes $array_of_obj[0]->method(). works. -- Yasuo Ohgaki