in reply to sort while push in hash
If you want to insert an element into an array at a certain position, then check out the splice function in your docs.
shift,unshift, push and pop add or remove elements from the beginning and end of an array, respectively.
|
|---|