pault Posted December 2, 2010 Share Posted December 2, 2010 I am using a multiple array with the layout: userarray['score'][00] userarray['id][00] userarray['name'][00] etc where the first column contains properties and the second column is the number for each user (shown as 00). After putting the data into the array, I want to sort the array by the score with the highest at the top. I have used the code: array_multisort($userarray['score'], SORT_NUMERIC, SORT_DESC); but it seems to sort the 'score' column while leaving the other columns in the original order. Obviously I want all the rows to remain related to each other. Can anyone help? Link to comment https://forums.phpfreaks.com/topic/220467-puzzled-by-array_multisort/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.