October 2005
Intermediate to advanced
372 pages
11h 35m
English
call_user_func_array()
mixed call_user_func_array ( functioncallback, arrayparams)
The call_user_func_array() function is a special way to call an existing PHP function. It takes a function to call as its first parameter, then takes an array of parameters as its second parameter.
$func = "str_replace";
$params = array("monkeys", "giraffes", "Hundreds and thousands of monkeys\
n");
$output_array = call_user_func_array($func, $params);
echo $output_array;