I need to be able to call a function, but the function name is stored in a variable, is this possible? e.g:
function foo () { //code here } function bar () {
For the sake of completeness, you can also use eval():
$functionName = "foo()"; eval($functionName);
However, call_user_func() is the proper way.