PHP arrays - how do you combine duplicates in an array?

tominic

New member
array_unique removes duplicates - and it does it perfectly.

But is there a way of combining duplicates? Say if one had a value of 2, and another had a value of 5, the combined value would be 7?

Cheers
 
Back
Top