Anyone ever done this - sort a multi-dimensional array

From: Date: Thu, 15 Nov 2001 16:07:35 +0000
Subject: Anyone ever done this - sort a multi-dimensional array
Groups: php.general 
Request: Send a blank email to php-general+get-74730@lists.php.net to get a copy of this message
Of the type...
        $array[0][0] = "!row of c's";
        $array[0][1] = "cccc";
        $array[1][0] = "row of a's";
        $array[1][1] = "aaaa";
        $array[2][0] = "a row of b's";
        $array[2][1] = "bbbb";
such that you sort on the value of the y-column? In this case, it would end up as:
        +--------------+------+
        | row of a's   | aaaa |
        | a row of b's | bbbb |
        | !row of c's  | cccc |
        +--------------+------+
Strange that I've been working with PHP this long and have never come across this problem. Sliante, Richard S. Crawford http://www.mossroot.com mailto:rscrawford@mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!"

« previous php.general (#74730) next »