Monday, 26 August 2013

if statement doesn't work when doing OR condition

if statement doesn't work when doing OR condition

I am using a if loop and my first option works one i.e $q1, i m trying to
make the loop run if anyone of the condition meet with a ||. am i doing it
wrong?
if($qs =='party' || $q2 == 'clothes' || $q3 == 'shopping' || $q5 ==
'Sunbathing' || $q6 == 'mini'){
echo "its working";
}else{
//do something else
}

No comments:

Post a Comment