Re: Help with Array Sorting Please
| From: | djoseph at twmi dot rr dot com | Date: | Thu, 07 Oct 2004 18:48:43 +0000 |
| Subject: | Re: Help with Array Sorting Please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-198875@lists.php.net to get a copy of this message | ||
> I have an array like this:
>
> 123 => 1 // each value may have few or many duplicate values
> 321 => 1
> 543 => 2
> 432 => 2 // like here, more 2's than 1's see?
> 566 => 2
> 568 => 2
> 999 => 3
> 878 => 3
> 444 => 3
>
> Now, the keys are not the issue. What i would really like, is for that
> array, to end up like this:
>
> 123 => 1
> 543 => 2
> 999 => 3
> 321 => 1
> 432 => 2
> 878 => 3
> 123 => 1
> 566 => 2
>
> and so on...
I didn't see your other thread, but, would sort() help you? www.php.net/sort
-Dan Joseph