joining array values
| From: | Merlin | Date: | Thu, 12 May 2005 11:30:19 +0000 |
| Subject: | joining array values | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-215033@lists.php.net to get a copy of this message | ||
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