Posted by Geoff Berrow on 02/24/07 08:43
Message-ID: <rl7vt29dl28t39esjj81ck50qf68hon8fa@4ax.com> from comatose
contained the following:
>>rsort($player_wins);
>
>
>I tried rsort, although it works but just for "$player_wins" but i need to keep the association
>with $player_loss and $player_name since they're directly related to each other.
That's not what you asked but never mind
>
>from my old basic language i remembered and use a double loop to get the job done, but i know there
>is a much easier way. and thats why i'm asking.
That sounds like a bubble sort (plenty of examples around). However you
still don't give us enough info. Where do these arrays come from? If
they come from a database then the simplest method would be to sort the
records before the output. Even if you don't use a database I still
think you can start to tackle the problem a lot further back.
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|