I have an array and I need to pass each element of the array as parameters to a function.
Say:
$var = array("var2","var3","var4");
//Pass each element as a new parameter to a function
call_to_function ($var2, $var3, $var4);
//However, if the number of array element change it can be
$var = array("var2","var3");
call_to_function ($var2,$var3);
The problem here is, how to build dynamic number of parameters and call the function.
Use: PHP Function mysqli_stmt::bind_param, takes multiple parameters. And I need to derive the parameters from an arrray.
Is there any way to do it?