On Mon, Jan 12, 2009 at 4:17 PM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > On Mon, 2009-01-12 at 16:02 -0500, tedd wrote: >> >> True, css does not allow numeric classes (like sessions). But, I >> never need them anyway. >> >> As I provided before: >> >> http://webbytedd.com/b/color-rows/ >> >> this is my solution for alternating row style. > > <tr class="row<?php echo($i++ & 1 );?>"> > <td >abc</td> > <td >abc</td> > <td >abc</td> > </tr> > > That's just wasteful... Here's better: > > <tr class="row<?php echo( $i ^= 1 );?>"> > <td >abc</td> > <td >abc</td> > <td >abc</td> > </tr> > > Cheers, > Rob. > -- > http://www.interjinn.com > Application and Templating Framework for PHP > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > You guys with your clever bit-shifting. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php