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.
call_user_func_array()should do the trick nicely.