How to pass array as multiple parameters to function?
As of PHP 5.6 you can use argument unpacking:
function add($a, $b, $c) {
return $a + $b + $c;
}
$numbers = [1, 2, 3];
echo add(...$numbers);
You need to use call_user_func_array
call_user_func_array( array($method, $function), $params);