Let's say I have an array like this
$update = array(
'field1' => 'one',
'field2' => 'two',
'field3' => 'three'
);
Then I have a function, let's say write() which accepts unlimited number of arguments like this write($thing_one,$thing_two,$thing_three,$thing_four)
So I know I can pass arguments like write($update[0],$update[1],$update[2]) but in real example I have a lot of keys and values in $update and what I want to do is find a way to pass arguments from this array to a function, so that it would be same as manually typing update($update[0],$update[1],$update[2])
I hope somebody will help me out. Thank you.
write()function to receive one variable and then retrieve individually inside the function by means of an indextable(name,surname) VALUES (?,?);")->execute('john','davids'); So I can create (name,surname) from array, and (?,?) as well, but cannot create 'john','davids' as arguments for execute function. thanks