Re: [PHP] Re: Alternet row colors

2003-11-17 Thread Chris Hayes
At 01:28 16-11-03, you wrote: It's so much easier to use the mod (%) operator: Ah, the alternating rowcolors. I have a proposal that's a lot lighter on your server. I prefer this as it does not require a calculation for each row (%2), and no counter (and no numrows call). I think it will be notica

Re: [PHP] Re: Alternet row colors

2003-11-16 Thread Kim Steinhaug
Thanks for this tip, i used to use this when I programmed Perl. But I didnt know it worked here aswell, hehe. Absolutely true that this is much better code practise, and it eases up the lines in the code. Great tip! -- Kim Steinhaug --

Re: [PHP] Re: Alternet row colors

2003-11-15 Thread Keith Greene
It's so much easier to use the mod (%) operator: using the mod operator, you can check if a variable is divisible by some other number without leaving a remainder. For this example, we want to change every other row, so we would compare our $count against 2 to see if it leaves a remainder: $bg =