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 () { //code here } $functionName = "foo"; // I need to call the function based on what is $functionName
Answer
$functionName()
or call_user_func($functionName)