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

From: Date: Fri, 05 Oct 2007 18:46:33 +0000
Subject: RE: [PHP] Alternate Colors in Rows ($r=!$r)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262835@lists.php.net to get a copy of this message
[snip] > > But why does the ($r=!$r) ternary condition work?. (I understand > that it DOES but not WHY.) [/snip] Check this out - http://us3.php.net/manual/en/language.operators.assignment.php It says the value of the assignment is the value assigned, so maybe assignments to anything other than 0 (or false) return true while assignments to 0 (or false) return false.

« previous php.general (#262835) next »