I am sending parameters as an array in second argument but not able to receive as one array in my receiving function, I can receive but one value as one variable so if have 3 parameters I have define three variables in my receiving function.
$this->params[] = 'val1';
$this->params[] = 'val2';
call_user_func_array([$this->controller, $this->method], $this->params);
I am expecting array in $param but getting in chunks like $param $param2
public function index( $params )
{
echo "<pre>";
var_dump($param);
}
public function index( $param1, $param2 )
{
echo $param1;
echo $param2;
}
call_user_func_array([$this->controller, $this->method], [$this->params]);call_user_funcinstead?