RE: [PHP] Alternate Colors in Rows ($r=!$r)

From: Date: Fri, 05 Oct 2007 19:19:27 +0000
Subject: RE: [PHP] Alternate Colors in Rows ($r=!$r)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262844@lists.php.net to get a copy of this message
[snip] > if($r = !$r) > > it is a conditional test. > > ? foo : bar; > > ...is the ternary operation. Just wanted to clean up the usage there. Did I miss something? The code I saw was the following: <TR class=<?php echo ($r = !$r) ? "dataRow1" : "dataRow2"; ?> > And that is definitely using the ternary operator. [/snip] No, you didn't miss anything. I was just pointing out that the ternary operation starts with the ?

« previous php.general (#262844) next »