only one Posted May 9, 2007 Share Posted May 9, 2007 hi, im trying to make the message center on my website look better... how do i make it so it shows the first table row with a diferent colored background from the next?? ive figured out a way of seting the next color in my database.. but is there a quiker way? Quote Link to comment https://forums.phpfreaks.com/topic/50659-different-colored-table-rows/ Share on other sites More sharing options...
per1os Posted May 9, 2007 Share Posted May 9, 2007 <?php for ($i=1;$i<$numRows;$i++) { if (($i%2) == 0) { print $color1; }else { print $color2; } } Modulous makes it easy. Quote Link to comment https://forums.phpfreaks.com/topic/50659-different-colored-table-rows/#findComment-249011 Share on other sites More sharing options...
only one Posted May 9, 2007 Author Share Posted May 9, 2007 lol thanks, im stupid.. Quote Link to comment https://forums.phpfreaks.com/topic/50659-different-colored-table-rows/#findComment-249017 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.