Hi Everyone,
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
bind_param($param1,$param2,$param3)
or if given 5 parameters
bind_param($param1,$param2,$param3,$param4,$param5)
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,
Timothy