Jump to content

Archived

This topic is now archived and is closed to further replies.

brown2005

can u use if($a == 5 AND $b == 5)

Recommended Posts

hi i was wondering if u could use to if satements together and how u do it?

if($a == 5 AND $b == 5)

Share this post


Link to post
Share on other sites
[code]if (($a==5) && ($b==5)) { ... [/code]

Share this post


Link to post
Share on other sites
Note that you can also use 'AND' instead of '&&', but they have different priorities.

Share this post


Link to post
Share on other sites
I think SemiApocalyptic means different priorities like in maths times is calculated before add and brackets is done first etc...

Share this post


Link to post
Share on other sites
http://ca3.php.net/manual/en/language.operators.php#language.operators.precedence

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.