Re: Alternate Colors in Rows ($r=!$r)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Blanchard wrote:
We just did that proof in the office as well. With a little echoing you
will see that when $r is TRUE it is set to 1, when it is false it is set
to NULL.

But it still should not work logically because you are performing an
assignment in the IF (it doesn't have to be ternary to work, that is
just elegant).

but, remember that the OP originally was doing this in a echo statement

echo '<td class="rowColor'.($r=!$r).'">...</td>';

Not sure if the (...) part considered an inline conditional statement at this point or not.

What say you?

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux