hello. i was think if i can use if like this: if (condition1 && (condition2 || condition3)) //or this will be fine: if (condition1 && condition2 || condition3) PHP:
i think this is what you mean. if($con1 || $con2 || $con3){ //your data here } PHP: if that is not what you mean then please do let me know.
Acutally that won't work. His condition is cond1 AND EITHER cond2 or cond3 meaning COND1 MUST be true AND EITHER cond2 or cond3 must be true In your version, even if cond1 is false, the condition will still pass, which is not how it's supposed to work.
i actually wanted to do so.i just want that cond1 must be true and one the cond2 or cond3 must be true. so if (condition1 && (condition2 || condition3)) Code (markup): is correct?
that is correct. here is the long evaluation of your statement if (condition1 is true and (condition2 is true or condition3 is true) so as long as either condition2 or condition3 is true and condition1 is true the if statement will execute;
i was in b/w developing a script and i was not getting wat i wanted but i was unable to find error. so i asked here if that if command is a problem.