amirelgohary1990 Posted May 28, 2023 Share Posted May 28, 2023 On 9/20/2009 at 7:22 AM, corbin said: Hrmmmmm odd. I just looked on the manual page for call_user_func_array and for some reason it appears that the array is passed by value. Usually things are passed by value, but they're references until it is edited. This is a ghetto hacked suggested by someone: $params = array('ss', 'stan', 'Stanley'); $tmp = array(); foreach($params as $key => $value) $tmp[$key] = &$params[$key]; call_user_func_array(array($stmt, 'bind_param'), $tmp); Hello Just I am trying to replace $params = array('ss', 'stan', 'Stanley'); With $arr = [1,2,5]; $params = array('ss', 'stan', $arr); But when I do that gives me error Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables Quote Link to comment https://forums.phpfreaks.com/topic/316351-problem-with-mysqli-and-bind_param/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.