RE: Help with Array Sorting Please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: Nick Wilson
To: php-general

* and then Ford, Mike declared....
php
> > 543 => 2
> > 432 => 2 // like here, more 2's than 1's see?
> > 566 => 2
> > 568 => 2
> > 999 => 3
> > 878 => 3
> > 444 => 3
> 
> That's not terribly good, as you are using the "unknowns" (ip
addresses) as keys to the "knowns" (machine IDs).  It would be better
keying off the machine IDs, although this does lead to a 2-level array;
something like:
> 
>    array( 1 => array(123),
>           2 => array(543, 432, 566, 568),
>           3 => array(999, 878, 444)
>         )

That's exactly what i have Mike, the above was what i had generated in
an attempt to get the ips in sequential machineId order ;-)

So, now im back to square one, do you have a suggestion as to how to
acheive the goal? -

many, many thanks..

--------------------------

Uh -- I believe I included some suggested code further down the email you've
just quoted....

Cheers!

Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux