I've got an array ("blue", "blue", "blue", "red", "red", "green", "green")
and I want to split this into three arrays -
array ("blue", "blue", "blue") and
array ("red", "red") and
array ("green", "green")
BUT I don't know the values of this array (blue & red & green are just an
example)
AND I don't know how many values in the array
I just want to seperate the values that are identical.
Is this possible?
See each matching value has a number and I want the total - (5,2,1,4,3,6,5)
5,2,1 belong to blue so add up to 8
4,3 belong to red and add up to 7
6,5 are green and add up to 11
I want 8, 7 and 11 not 26.... you see what I mean???
I've looked at all the arrays in the php manual and i can't figure it out.