Re: Sort two coupled arrays {my solution]

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

 



At 8:28 AM -0400 4/8/10, Andrew Ballard wrote:
On Wed, Apr 7, 2010 at 6:46 PM, Ryan Sun <ryansun81@xxxxxxxxx> wrote:

 >
 rsort(array_combine(array2, array1));

 you should expect array(
  'Personal Email' => 75,
  'USPS mail' => 40,
  'Personal Phone' => 31,
  'Web site' => 31,
  'Text Message' => 31
 )

 logically, the items are your key but not the count of votes


That's the ticket. The solution is pretty simple now that we
understand the nature of the problem.  :-)

Andrew

Andrew:

Half the solution is understanding the problem.

However, the above solution only solves half the problem.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
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