in reply to Sorting multi-dimensional arrays
Your problem is that the <=> operator in the sort is a numeric comparison, and with the strings not beginning with a number they evaluate to a 0.
Simple solution: Replace the <=> with a cmp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting multi-dimensional arrays
by Aristotle (Chancellor) on Sep 11, 2002 at 17:18 UTC | |
by Molt (Chaplain) on Sep 12, 2002 at 10:14 UTC |