joining array values

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

 



Hi there,

I do have a tricky problem with arrays.

There are 3 arrays:

$result[id][]
$result[text][]
$result[relevance][]

Now there might be the case that there are more results with the same $id. I would like to count all the relevances together for the same id.

For example:
id	text	relevance
23	ok	2
42	joel	1
23	php	1

Desired output:
id	text	relevance
23	ok php	3
42	joel	1

Has anybody an ide how to do that?

Thank you for any help,

Merlin

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