Jump to content

Recommended Posts

Posted

I had a quick question about how the if statement works. Say i want to do something like if $a=1 and ($b=2 OR $b=3). Would that statement as is work? Or would it need to be "if $a=1 and $b=2 OR $a=1 and $b=3"?

In other words, when trying to use BOTH "and" as well as "or" in the same if statement, what is the proper way to break it down and lay it out? Is there a nice and short way of doing it?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...