I have a multidimensionalarray - $students.
They are normally in order of surname.
Another field contains exam marks.
I sort them in terms of exam marks, highest at the top using usort, and this works fine --- in a way.
However if several students have the same exam marks, the set containing the same exam mark in now no longer in order of surname:-
Start with:-
surname mark
Allen 77
Evans 77
Jones 78
Simons 78
Smith 77
Williams 77
sort using usort() - field to compare is "mark"
Sorts to
1 Jones 78
2 Evans 78
3 Simons 78
4 Williams 77
5 Smith 77
6 Allen 77
So students are ranked by mark, highest at the top, but within a group of the same mark the names are no longer alphabetical. somethng to do with the way usort does its sorting I suppose.
any ideas how to get the names in order within the same mark set????
Cheers
paulsim