Moving array items - Best practice?

Hi there,

This has been on my mind for a while, that I’m doing this wrong, so I thought I’d ask for some advice…

Lets say I have an array full of items, there are nested arrays within each item. What is the best way to move array_item[5] to array_item[3].

The way I do it at the moment, is
• create a temp_array_item
• loop thru array_item[5] to get everything out and transfer it to temp_array_item
• delete array_item[5]
• then splice an empty item into postion 3
• loop thru the temp_array_item and put it all back

This seems terribly inefficient to me, can someone please help?

Thanks!