Call us Toll-Free:
1-800-218-1525
Live ChatEmail us

 Sponsors

alt rows

Code Wizard, 12-30-2006

example of how to do alternating table cell colours in php heh
i hope this code will help you make some cool 'html designs' in php :)

root@g33k.net
irc.system33r.org
http://system33r.org/

our server is down due hardware upgrades, my new email also is "root@g33k.net".

<?php
echo "<table>";
for($j=1;$j<8;$j++)
{
$h=$j/2;
if(is_float($h))
$bg="lightblue";
else
$bg="lightyellow";
echo "<tr><td bgcolor=$bg>row #$j</td></tr>";
}
echo "</table>";
?>
Enjoyed this post?

Subscribe Now to receive new posts via Email as soon as they come out.

 Comments
Post your comments












Note: No link spamming! If your message contains link/s, it will NOT be published on the site before manually approved by one of our moderators.



About Us  |  Contact us  |  Privacy Policy  |  Terms & Conditions