Re: row colours

From: Date: Sat, 05 Jun 2004 14:54:33 +0000
Subject: Re: row colours
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187675@lists.php.net to get a copy of this message
BigMark wrote:
this piece of script makes alternate row colours, but i want the rows to be coloured in blocks of 8. So the first 8 rows are white then the next are mauve etc etc. Alternatively i could make the rows all the same colour , but i need a blank row after each 8 rows.? Any ideas ---------------------------------------------------------------------------- ------
untested: if($i % 16 > 8)
// if ($i%8 == 0) { print "<tr bgcolor=\"#ffffff\"><td>$item_1</td><td>$item_2</td><td>$item_4</td><td><cen ter>$item_5</center></td></tr>\n"; } else { print "<tr bgcolor=\"#eeeeff\"><td>$item_1</td><td>$item_2</td><td>$item_4</td><td><cen ter>$item_5</center></td></tr>\n"; } ---------------------------------------------------------------------------- ---


« previous php.general (#187675) next »