Add this to your default.css file... Or to the page...

<style>
TR.dataRow1 { background-color: #e8f5f7; } /* light */
TR.dataRow2 { background-color: #dce8ea; } /* dark */
</style>

Then just do this:

<TR class=<?php echo ($r = !$r) ? "dataRow1" : "dataRow2"; ?> > 

Forget all that $i++ and (mod) % stuff...

And NEVER hardcode the colors in the page. Use CSS !


Adjust to use a DIV as needed.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to