Calling function
| From: | Przem Kowalczyk | Date: | Wed, 05 Jul 2000 08:59:52 +0000 |
| Subject: | Calling function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-4896@lists.php.net to get a copy of this message | ||
Hi
How can I call function, thats name is stored in a variable?
An example:
class Foo
{
var $fun_name;
function exec_fun()
{
$this -> fun_name; (??? - doesn't work)
}
function test()
{
echo "test only";
}
}
$foo = new Foo();
$foo -> fun_name = 'test';
$foo -> exec_fun();
Przem
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E dx s+: a-- C++ UL+++ P+++ L+++ E--- W+++ N++ o+ K- w++
O M- V-- PS+ PE Y PGP t-- 5- X++ R tv-- b+++ DI++ D---
G+ e+ h-- r++ y+
------END GEEK CODE BLOCK------