Re: Another array sorting Problem
| From: | Philip Hallstrom | Date: | Sun, 17 Apr 2005 01:59:30 +0000 |
| Subject: | Re: Another array sorting Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-213224@lists.php.net to get a copy of this message | ||
Hi, I have a multidimensional array looking linke this Rowid title kat 123 nr1 3 442 nr2 2 547665 nr3 5 [snip]
I now need to sort that array first by kat and second on rowid, so it would throw out: Nr5 Nr6 Nr2 [snip]
I tried to achieve that goal with array_multiosort(), but all I got was a one way (either rowid or kat) sorting. Do you know some kind of way to achieve my goal?Take a look at usort()... http://us4.php.net/usort There's an example for multi-dimensional arrays... -philip