Re: array_flip duplicate keys as arrays

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

 



At 11:39 AM -0500 9/13/06, Richard Lynch wrote:
I figured somebody else must have needed this, so there'd have to be a
PHP function for it...

But I'm not finding it when I rtfm...

Given an array like this:

$t9 = array('F' => 'FIND', 'D' => 'FIND', 'E' =>'FIND', 'H' => 'HELP',
'I' => 'HELP');

I'm looking for a built-in function that returns this:
array('FIND' => array('F', 'D', 'E'), 'HELP'=>array('H', 'I'))

Or maybe I'm the only goofball that needs this?

Obviously I can write it with a loop.

But is there some quick built-in function I'm missing?


Richard:

Perhaps a combination of array functions such as:

array_flip()

array_unique()

hth's

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