Hi, I have a very long array with sequential numeric keys. What is the best method for inserting an element in the middle thus bumping all following elements along one key.. Like the function array_unshift() but where i can chose where in the key rank to insert the new element.
the best i can come with is to loop through each element after the insert and increment their keys by +1 to make room. I'm hoping there is a function for this that i'm missing...
Thanks!
the best i can come with is to loop through each element after the insert and increment their keys by +1 to make room. I'm hoping there is a function for this that i'm missing...
Thanks!
Comment