I'm looking for the correct PHP elseif syntax?

tom v

New member
I have the following parameters that I'm trying to find the proper PHP syntax for an elseif statement.

$x=5;
$y=12;

IF $x is even
AND $y is even ( do nothing)

IF $x is odd
AND $y is odd ( do nothing)

IF $x is even
AND $y is odd ( $y = $y+1)

IF $x is odd
AND $y is even ( $y = $y+1)

How would you create that in PHP?
 
Back
Top