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;} ? 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 &&. 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
Archived
This topic is now archived and is closed to further replies.