physaux Posted November 17, 2009 Share Posted November 17, 2009 Is there a quick function that could do this, or do I have to make one? I have: myarray[1]['points'] = 4 myarray[2]['points'] = 8 myarray[3]['points'] = 32 myarray[4]['points'] = 2 ... myarray[64]['points'] = 52 The array has 64 elements, and will always have different numbers. How can I sort the array, so that the biggest number is first, but I still need to know its index. Anyone have any idea :confused: Link to comment https://forums.phpfreaks.com/topic/181905-how-can-i-sort-an-array-by-its-contents-but-keep-related-indexes-values/ Share on other sites More sharing options...
Alex Posted November 17, 2009 Share Posted November 17, 2009 arsort() Link to comment https://forums.phpfreaks.com/topic/181905-how-can-i-sort-an-array-by-its-contents-but-keep-related-indexes-values/#findComment-959421 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.