ummmm... try echo "<pre>"; for( $i=0 ; $i<10; $i++){ echo "something " . (($a = $a^1) ? "red\n" : "green\n"); } echo "</pre>";
watchout the brackets ! cheers ralph_def...@yahoo.de "John Butler" <govinda.webdnat...@gmail.com> wrote in message news:52842d6f-dd45-44a6-ae06-2e58ef8f6...@gmail.com... > quick Q: > I have this inside a foreach{} that I want to alternate between on > and off so I can alternate the background-color of my <tr>'s. > > $tableRowBGcolorBoolCounter != $tableRowBGcolorBoolCounter; //-boolean > on and off > > I am looking thru' docs and books, but can't remember (nor find now) > in PHP how to say "inverse your value" (to a boolean). > ? > > TIA! -G > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php