Re: Couple of beginner questions
| From: | Ashley Sheridan | Date: | Mon, 12 Jan 2009 22:04:06 +0000 |
| Subject: | Re: Couple of beginner questions | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-286173@lists.php.net to get a copy of this message | ||
On Mon, 2009-01-12 at 16:54 -0500, tedd wrote:
> At 9:37 PM +0000 1/12/09, Ashley Sheridan wrote:
> >On Mon, 2009-01-12 at 16:17 -0500, Robert Cummings 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.
> >It is a *lot* smaller than my example. I like it! :p
>
> Rob is good at providing small examples, but maybe we shouldn't talk
> about that. :-)
>
> Cheers,
>
> tedd
>
Lol, are we still talking about PHP here? ;)
Ash
www.ashleysheridan.co.uk