I am having trouble with calling bind_param via call_user_func_array. I am trying to do it like this:
call_user_func_array(array($stmt, "bind_param"), array_merge(array($types), $params));
and I am getting this error:
Warning: Parameter 2 to mysqli_stmt::bind_param() expected to be a reference, value given in...
I thought it was because my array was malformed as other questions have noted but I did a var dump like this:
var_dump(array_merge(array($types), $params));
and I got this result, which I thought was the correct input format:
array (size=2)
0 => string 's' (length=1)
1 => string 'Hello' (length=5)
Please could somebody tell me where the error lies?