i have two arrays like
$a1 $b1
0 : A 10
1: B 10
2: A 15
3: A 20
4: B 05
5: c 25
now i want to calculate them in same way then result is A=45, B=15 and C=25