aquastream Posted February 8, 2010 Share Posted February 8, 2010 After sorting an array using a sorting function (sort, rsort, asort etc), I want to reset the array back so that its values are located at their original index numbers. What command is there if any which achieve this? Link to comment https://forums.phpfreaks.com/topic/191314-resetting-an-array/ Share on other sites More sharing options...
btherl Posted February 8, 2010 Share Posted February 8, 2010 There isn't any. You can make a copy of the array before sorting. Link to comment https://forums.phpfreaks.com/topic/191314-resetting-an-array/#findComment-1008675 Share on other sites More sharing options...
aquastream Posted February 8, 2010 Author Share Posted February 8, 2010 Yeah that's what I thought. I'll keep the thread marked unsolved just in case, but I was pretty sure my Googling was good enough. Thanks for responding btherl! Link to comment https://forums.phpfreaks.com/topic/191314-resetting-an-array/#findComment-1008682 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.