note 9558 deleted from eval by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Sat, 11 Nov 2000 00:37:39 +0000 |
| Subject: | note 9558 deleted from eval by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-7587@lists.php.net to get a copy of this message | ||
The following tooks me an hour to figure out:
If you have a variable $hdl contains the
name of the function that you want to
execute, and you have the variable $var
contains the values that need to be passed into the function in $hdl, the
way to execute them is:
eval ("$hdl ($var);");
So, you can have functions's names saved
in a database, and pass in values come from somewhereelse, and dynamically choose the right
functions to process the input data.