<?php
$bool = 0;
while(........)
{
	$kleur = ($bool = ($bool ^ 2)) ? 'rood' : 'groen';
	echo '.......... class="' . $kleur . '".....';
}
?> 