【发布时间】:2015-05-20 20:42:50
【问题描述】:
我发现了来自here 的问题。但我需要用参数调用函数名。 我需要能够调用一个函数,但是函数名存储在一个变量中,这可能吗?例如:
function foo ($argument)
{
//code here
}
function bar ($argument)
{
//code here
}
$functionName = "foo";
$functionName($argument);//Call here foo function with argument
// i need to call the function based on what is $functionName
任何帮助将不胜感激。
【问题讨论】:
标签: php