Jump to content

On multiple conditions with if()


FinalFrontier

Recommended Posts

I forgot how to write multiple conditions with if().

 

if (A == B || C == D) {foobar;}

I know the above is if any of the conditions is true, then do foobar, but what is it again so they both have to be true? I have forgotten, but I'm guessing either

 

if (A == B && C == D) {foobar;}

if (A == B ++ C == D) {foobar;}

 

?

Link to comment
https://forums.phpfreaks.com/topic/254015-on-multiple-conditions-with-if/
Share on other sites

Archived

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

×
×
  • Create New...

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.