On Tue, Feb 28, 2012 at 8:36 AM, Shawn McKenzie <nospam@xxxxxxxxxxxxx> wrote: > Might be an easier way but this should work. You can sort the $before = > true out for yourself :-) Hi Shawn, I've updated your function to do the $before bit: <https://gist.github.com/1928452#file_array_insert.php> I also set it up to merge the new array to the end if the key does not exist. Out of all the examples I have found, your approach looks the cleanest and the most compact. I'm open to feedback. Many thanks!!!! Cheers, M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php