FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Array_multisort help please
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Array_multisort help please [message #170286 is a reply to message #170285] Tue, 26 October 2010 21:22 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On 26/10/10 19:20, MikeB wrote:

> I had to spend quite some time to try and figure out what your code was
> doing, so if you don't mind, can you please check my comments and tell
> me if I figured it out correctly?

Looks about right. Oh, and I don't think it matters whether you sort the
second level or the top level first, so you could probably do the
ksort($array1) at the end if you wanted to.

> So
> essentially there isn't an in-place sort that would have done what I
> wanted to do and this is a slick method to simulate that?

I wouldn't call it slick, but it is a method, yes. It's specific to the
format of your data (although it will probably work for any 2d or higher
order array that you want to sort on the first two keys).

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IT job
Next Topic: Php windows system(whois) not working
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 11:43:18 GMT 2024

Total time taken to generate the page: 0.04432 seconds