I would like to pick your guys' brains about calculating the same hash table data into its total number.

Currently I have these in my hash table data:
Quote:
3 apples,9 apples,8 strawberries,7 grapes,2 watermelons
As you can see there are two identical data values for 3 apples and 9 apples. How do I add them up into one data as 12 apples, preferably make them appear like this in the hash table data:
Quote:
12 apples,8 strawberries,7 grapes,2 watermelons
Thanks in advance.

There will be more repeated data values being stored, and I need the same ones to be added together as one data with its total calculation.

Last edited by Tomao; 23/05/11 06:08 PM.