in reply to Re: Odd and even table rows
in thread Odd and even table rows

or even $class = $i % 2 ? 'odd' : 'even'; - I use this often enough that I think it's clear what's happening without the explicit == 0