Hello, I am trying to use array in bind statement to avoid entering bind manually
Below, I set up the array, then imploded the array to insert , on it // to return 1,2,5 , but I got error Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables
$arr = [1,2,5];
$arr_as_string = implode( ',',$arr);
$type = 'iii';
$params = [$type,$arr_as_string];
$tmp = [];
foreach($params as $key => $value) $tmp[$key] = &$params[$key];
call_user_func_array([$query, 'bind_param'], $tmp);