call function as variable

From: Date: Sat, 16 Aug 2003 05:58:27 +0000
Subject: call function as variable
Groups: php.general 
Request: Send a blank email to php-general+get-159788@lists.php.net to get a copy of this message
Hi! I have folowing function which they are a member in a class. function foo(){ something } function zoo(){ something else } and i have a array such: $test = array(1=>foo,2=zoo); and i want to call the fuction foo() and zoo something like; $object->$test[1](); I have tried this this, it will not working. But is there any other way to do something like this!! cheers

« previous php.general (#159788) next »