note 77190 deleted from language.oop by danbrown

From: Date: Sat, 07 Nov 2009 19:03:01 +0000
Subject: note 77190 deleted from language.oop by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162554@lists.php.net to get a copy of this message
Note Submitter: skds1433 at gmail dot com ---- You may asign classes to arrays: <?php class foo { function test_foo() { echo "test_foo 1 2 3<br />"; } } class bar { function test_bar() { echo "test_bar 1 2 3<br />"; } } $classes = array(); $classes['foo'] = new foo(); $classes['bar'] = new bar(); $classes['foo']->test_foo(); $classes['bar']->test_bar(); ?> Output: test_foo 1 2 3 test_bar 1 2 3

« previous php.notes (#162554) next »