In your loop, you may have a variable already that's keeping
track of how many rows you're displaying. If not, you need to
add one.
Either way, you then can say at the top of the per-row loop:
if ($rownum % 2 == 0 )
$color = '#ffffff';
else
$color = '#dddddd';
echo "<tr bgcolor=\"$color\">";