I have an associative array where userID is the key, and each key contains an array.
So, Score is array[0] and Date is array[1].
that is:
$arr[userID] = array(Score, Date);
Output looks like below:
UserID: 10
Score: 4
Date: 852105600
UserID: 12
Score: 5
Date: 852105600
UserID: 14
Score: 3
Date: 946713600
UserID: 16
Score: 3
Date: 852105600
I would like to order by score, and then order by Date, but ordering by date must occur without messing up the order by score order.
So, the desired output would be:
UserID: 12
Score: 5
Date: 852105600
UserID: 10
Score: 4
Date: 852105600
UserID: 14
Score: 3
Date: 946713600
UserID: 16
Score: 3
Date: 852105600
Problem is, I don't know how to do it.
Any help?
Many thanks!
matt.