$alt_on=0; while (outputting_threads_or_posts) { if (!$alt_on) { show_first_color; $alt_on = 1; } else { show_second_color; $alt_on = 0; } }