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 #171238 is a reply to message #171235] Wed, 29 December 2010 19:55 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
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.
>
> Mike

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

I saw one bit of code that showed === and I'm reacting like wtf?
Had not seen that one before. Now I have a resource for that stuff.
[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: Sat Nov 23 08:49:05 GMT 2024

Total time taken to generate the page: 0.04967 seconds