php - How do I weed out similar items from an associative array?
<p>UPDATE: someone edited my question incorrectly, but it's fixed now</p>

<p>Let's say I have the following associative array:</p>

<pre><code>Array ( 
[Postponement no issue for Man Utd (BBC) ] =&gt; 8 
[Postponement no issue for Man Utd ] =&gt; 7 
[Postponement no issue for Man Utd: Manchester United say they have no issue over Sunday's game at Chelsea being ... ] =&gt; 3
)
</code></pre>

<p>You'll notice that the term "Postponement no issue for Man Utd" appears in all three keys. I want to turn this array into a new array like this:</p>

<pre><code>Array ( [Postponement no issue for Man Utd] =&gt; 18 )
</code></pre>

<p>Where 18 is the sum of all values where the key contains "Postponement no issue for Man Utd".</p>

<p>In other words: if one key appears inside another key, the latter is dropped fom the new array and it's value is added on to the former key's value.</p>

<p>Is this possible and how? Thanks in advance.</p>
