I want to execute some code in php only if two if statements are true.
e.g. if $a = a and $b = b then do {...1...} else do {...2...}
And I want to make it so there are three possibilities:
e.h. if $a = a1, a2 or a3 and $b = b1, b2 or b3 (respectively) then do {...1...} else do {...2...}.
I want to code this in PHP and {...1...} should only be executed in the following instances:
When $a = a1 and $b = b1
When $a = a2 and $b = b2
When $a = a3 and $b = b3
But {...2...} should be executed at all other times i.e. when
When $a = a1 and $b = b2
When $a != a1 and $b = b1
When $a = a3 and $b = b1
When $a = a2 and $b != b1
etc...
Can anyone help me with this?
2006-10-30
02:54:07
·
2 answers
·
asked by
turkeyphant
3