FinalFrontier Posted December 29, 2011 Share Posted December 29, 2011 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;} ? Quote Link to comment https://forums.phpfreaks.com/topic/254015-on-multiple-conditions-with-if/ Share on other sites More sharing options...
FinalFrontier Posted December 29, 2011 Author Share Posted December 29, 2011 Its &&. Quote Link to comment https://forums.phpfreaks.com/topic/254015-on-multiple-conditions-with-if/#findComment-1302154 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.