On Sat, Jun 05, 2004 at 04:54:33PM +0200, Marek Kilimajer wrote:
> 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
> >
> >
> >----------------------------------------------------------------------------
> >------
>
How about:
$bgcolor = ($i % 16 > 8) ? #eeeeff : #ffffff;
print "<tr
bgcolor='$bgcolor'><td>$item_1</td><td>$item_2</td><td>$item_4</td><td><cen
ter>$item_5</center></td></tr>\n";
>
> >// 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";
> > }
> >----------------------------------------------------------------------------
> >---
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Jim Kaufman
Linux Evangelist
public key 0x6D802619
http://www.linuxforbusiness.net
---
Duty then is the sublimest word in the English language. You should
do your duty in all things. You can never do more, you should never
wish to do less.
-- General Robert E. Lee
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php