FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » AND in the if statement
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: AND in the if statement [message #171272 is a reply to message #171238] Wed, 29 December 2010 23:09 Go to previous messageGo to previous message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma:
Senior Member
In article <18a130wqz1i57$(dot)dlg(at)evanplatt(dot)sux>,
richard <member(at)newsguy(dot)com> wrote:

> On Wed, 29 Dec 2010 11:42:41 -0800 (PST), Mike wrote:
>
>> Basic... is there (still) such a thing?
>>
>> if( $a==1 && $b==2) { // do some cool stuff }
>>
>> If you use a single =, you'll actually set the value and it'll always
>> be true. the double == checks equality without changing the value.
>> Use || for OR.

> Finally found a site that describes all the good stuff like that.
> http://www.elated.com/articles/php-operators/

And this differs from:

<http://www.php.net/manual/en/language.operators.php>

precisely how? And don't say it's because you need an extra click to get
to each section either.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: php-debug-faq-post in progress
Next Topic: using same variable twice on same page
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 12:33:56 GMT 2024

Total time taken to generate the page: 0.05148 seconds