I am trying to figure out how to assign a number rank to a set of results, but I need to reset the ranking when a certain column changes. For example:
Brand Rank
a 1
a 2
a 3
b 1
b 2
b 3
I set $rank=0; and then for each item in my loop I add $rank++; How do I get the rank to reset in the loop when the brand changes? Thanks for any help.