Posted by Philip Hallstrom on 04/17/05 04:59
> 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
Navigation:
[Reply to this message]
|