To build a bind_param dynamically, I have found this on other SO posts.
call_user_func_array(array(&$stmt, \'bindparams\'), $array_of_params);
array($stmt, 'bindparams')
is PHP's way of identifying method bind_params on the object $stmt, since PHP 5 you don't need to use the & in front any longer (and mysqli is PHP 5 so this looks like a glitch in the older post).
you can see a similar example here
so
call_user_func_array(array($stmt, 'bindparams'), $array_of_params);
basically means
$stmt->bind_params($array_of_params[0], $array_of_params[1] ... $array_of_params[N])