On Mon, 18 Feb 2002, Scott Saraniero wrote:

> I've got a piece of code below that works great for me. Now I would like to
> modify the rows with alternating colors in the displayed results. Any
> suggestions on how to do this?

Try this:

$Count = 0;
while ($Row = mysql_fetch_array($Result) {
        print('<td ');
                if($Count % 2)
                        print ('class="textOnWhite")';
                        print ('class="textOnGray")';


You could probably replace $Count with some mysql function (it would be named 
something like
mysql_current_row($Result)), but I obviously don't know that much about it.


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

Reply via email to