Here is my MySQl table

```
Id    Name   Value
1    abc     12
2    xyz     32
3    abc     43
4    cde     54
5    fgh     75
6    abc     56
7    fgh     98

```

I want to add an incrementing number to each duplicate value when its been printed using a foreach loop as shown below. 

```
abc (1) = 12
abc (2) = 43
abc (3) = 56
cde = 43
fgh (1) = 75
fgh (2) = 98
xyz = 32

```

Is it possible to achieve this?