if (($counter++ % 2) != 0) { $backcolor = "class=\"alt1\""; } else { $backcolor = "class=\"alt2\""; }