RE: Alternate table rows

From: Date: Fri, 04 Oct 2002 06:34:19 +0000
Subject: RE: Alternate table rows
Groups: php.windows 
Request: Send a blank email to php-windows+get-16158@lists.php.net to get a copy of this message
Hi Davy, I hope this helps. best regards <?php $gray = 1; $colors[0] = "#efefef"; $colors[1] = "#d3d3d3"; echo "<table cellpadding=\"2\" cellspacing=\"1\"bgcolor=\"#ffffff\">\n"; while ($row=mysql_fetch_array($result)) { $gray = !$gray; echo "<tr bgcolor=\"" . $colors[$gray] . "\">\n"; echo "<td>" . row['products'] . "</td>\n"; echo "</tr>\n"; } echo "</table>\n"; ?>

« previous php.windows (#16158) next »