Incorporating Alternate bg color rows
Posted: Thu Mar 25, 2004 5:53 pm
Looking to do an alternating row background color like i have here
http://www.becauseitscool.com/htables22.php
I've looked around, none seem to work with what I already have. I already did it once, but can;t get it to work with a specific query and table that I am using below. It is a plain table with no color in the output echo variables.
What is an easy code to use with the code I have below? And where would it need to go?
<?
while ( $row = mysql_fetch_array($result))
{
echo "<tr><td>$row[against]</td><td>$row[ab]</td><td>$row[h]</td><td>$row[hr]</td><td>$row[rbi]</td><td>$row[doubles]</td><td>$row[triples]</td><td>$row[r]</td><td>$row[sb]</td></tr>";
}
?>
---------------------------------------
Thanks in advance you guys rock!!!
http://www.becauseitscool.com/htables22.php
I've looked around, none seem to work with what I already have. I already did it once, but can;t get it to work with a specific query and table that I am using below. It is a plain table with no color in the output echo variables.
What is an easy code to use with the code I have below? And where would it need to go?
<?
while ( $row = mysql_fetch_array($result))
{
echo "<tr><td>$row[against]</td><td>$row[ab]</td><td>$row[h]</td><td>$row[hr]</td><td>$row[rbi]</td><td>$row[doubles]</td><td>$row[triples]</td><td>$row[r]</td><td>$row[sb]</td></tr>";
}
?>
---------------------------------------
Thanks in advance you guys rock!!!