Re: Help with Array Sorting Please

From: Date: Fri, 08 Oct 2004 12:20:02 +0000
Subject: Re: Help with Array Sorting Please
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199001@lists.php.net to get a copy of this message
* and then Ford, Mike declared.... > > 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.. -- Nick W

« previous php.general (#199001) next »