PHP OOP

From: Date: Tue, 03 Sep 2002 20:58:08 +0000
Subject: PHP OOP
Groups: php.general 
Request: Send a blank email to php-general+get-115090@lists.php.net to get a copy of this message
I have a problem, I can't create an array of classes into a class, for example: class one { var $a; function foo() { echo "foo"; } } class two { var $b; function initialize() { $b[0] = new one(); $b[1] = new one(); } } $test = new two(); $test->initialize(); $test->b[0]->foo(); //It doesn't work $test->b[1]->foo(); //It doesn't work Any suggestion?

« previous php.general (#115090) next »