It’s another, even simpler way to do it.
At the top of your page, put<?$i;?>, then, inside your comments loop, put <div class=”<?=($i%2)?”color1″:”color2″;$i++;?>”>. Then, somewhere in your stylesheet, put
.color1 {background-color: #DBDBDB;}
.color2 {background-color: #EEEEEE;}