Re: [PHP] Anyone ever done this - sort a multi-dimensional array

2001-11-15 Thread Steve Cayford
You can roll your own fairly easily: function mycmp($a,$b) { return strcmp($a[1],$b[1]); } usort($array, 'mycmp'); ...something like that at any rate. -Steve On Thursday, November 15, 2001, at 10:07 AM, Richard S. Crawford wrote: > Of the type... > > $array[0][0] = "!row of c's"

[PHP] Anyone ever done this - sort a multi-dimensional array

2001-11-15 Thread Richard S. Crawford
Of the type... $array[0][0] = "!row of c's"; $array[0][1] = ""; $array[1][0] = "row of a's"; $array[1][1] = ""; $array[2][0] = "a row of b's"; $array[2][1] = ""; such that you sort on the value of the y-column? In this case, it