Let say I have an example array('color'=>'green', 'size'=>'big')
How can I insert 'weight'=>'heavy' at the beginning of array?
array_unshift would not accept 'weight'=>'heavy' as a parametar.
simple array manipulation
Moderator: General Moderators
Re: simple array manipulation
You can use combination of array_fill_keys() and array_unshift() function.