I have 10 values stored in a table like this:
+--------------------------+
| input | letter | number|
+--------------------------+
| input1 | A | 3 |
| input2 | P | 5 |
| input3 | I | 8 |
| input4 | M | 8 |
| input5 | A | 2 |
| input6 | P | 2 |
| input7 | M | 1 |
| input8 | F | 2 |
| input9 | F | 4 |
| input10 | A | 2 |
+--------------------------+
All i want to do is to select same letters from the letter column and calculate the sum of the respective number of the number column... then group letters and respective sum to get the output in php in this way:
$totA="7A"
$totP="7P"
$totI="8I"
$totM="9M"
$totF="6F"