I am using the bind_param() function and am building a function around it. I need an automated way of inserting a uncertain (unlimited) amount of parameters into this function. ie have the php code able to insert parameters into the bind_param() function on its own. So if it is given 3 parameters put them in as
or if given 5 parameters
I need a way of having the script insert them in for me.
What I was thinking was having all of these parameters giving to a function above this as an array. I would then use a foreach loop to determine what type of value each value in this array is and create a string with the appropriate letters to have as the first parameter in the bind_param($value_types ...
Then I need a way of cycling through this array and adding how ever many values it has, as individual parameters, to the bind_param() function.
Thanks in advance,