...

View Full Version : IF Else Statement Problem



KatieK
12-09-2010, 08:52 PM
Is there a way to do the following??


IF statement1 OR statement2 OR statement3 is true

then do code here


Seems like there should be but i haven't had any luck so far...

myfayt
12-09-2010, 09:02 PM
if (($text == '1') && $text2 == '2' && $text3 == '3') {
//Do
}
else {
//Don't do
}

poyzn
12-09-2010, 09:13 PM
if($statment1 || $statement2 || $statement3) echo 'some of the statements is true';

myfayt
12-10-2010, 02:11 AM
Whoops haha missed the OR in the original message, I did AND



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum