Re: how to say "inverse your value" (to a boolean)?

From: Date: Tue, 11 Aug 2009 20:13:10 +0000
Subject: Re: how to say "inverse your value" (to a boolean)?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-296669@lists.php.net to get a copy of this message
John Butler wrote:
What a lot of good ideas spawned from the OP! I am learning many things,.. while also actually working (paying bills), so I regularly have to just go with what I know well. Anyway, I already have the forearch { loop (for other reasons it is necessary), and I only needed one color to alternate with the default white.. so I used this: forearch { ... $tableRowBGcolorBoolCounter = !$tableRowBGcolorBoolCounter; //- boolean on and off (which then sticks in one CSS class or another for that <tr>. thanks for everyone's feedback. -John
Yeah, but forearch ain't going to work.
what do you mean? I must have neglected to include more of the relevant code to show you that it IS working just fine. I will certainly explain more if you ask.. but the whole point of me starting the thread was just to be reminded how to inverse a boolean var's value. Tony answered me; I am happy. I assume you don't want me (the newbie) to show how I have it working. (?)
He's pointing out a typo... "forearch" instead of "foreach" :) Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#296669) next »