mellenburg
Programmer
I have a MYSQL table with the following type of values for variable x.
1
1
2
3
3
4
I want to rank these cells with the following values.
1, 1
1, 1
2, 3
3, 4
3, 4
4, 6
So if the values are equal, the ranking is the same. Using PHP, is there a way to retain the last value of the fetch_array so that I may compare it to the next value to determine whether or not to incriment rank, or to keep rank equal to the previous value.
Or, is there an easier technique to do this that I'm not aware of?
1
1
2
3
3
4
I want to rank these cells with the following values.
1, 1
1, 1
2, 3
3, 4
3, 4
4, 6
So if the values are equal, the ranking is the same. Using PHP, is there a way to retain the last value of the fetch_array so that I may compare it to the next value to determine whether or not to incriment rank, or to keep rank equal to the previous value.
Or, is there an easier technique to do this that I'm not aware of?