I personally would use eval() unless you will be calling the functions with parameters that can change, and even then I might give it a try.
http://us2.php.net/manual/
$function = 'dothisandthat();'
eval($function);
As with anything that executes I would only use trusted sources to these function, but it appears that you are creating them yourself.
You could actually build the parameters and still use eval.
$paremeter1 = 'code to create parameter 1';
$paremeter2 = 'code to create parameter 2';
$function = 'dothisandthat('.$paramete
eval($function);
Main Topics
Browse All Topics





by: angelIIIPosted on 2008-01-18 at 12:42:23ID: 20693959
this should answer: a/php/2001 /05/17/ php _foundatio ns.html?pa ge=2
http://www.onlamp.com/pub/