Conditions

Juan Rodriguez


Warning: Undefined variable $b in /home/rodri797/public_html/assignment3/conditions.php on line 16
the sum of a and b is not greater than 10

Warning: Undefined variable $b in /home/rodri797/public_html/assignment3/conditions.php on line 26
a is bigger than b
i equals 2

Conditions are used when you want to compare a value with another value and if there could be multiple outcomes. There are different blocks in the conditions and they are there to cover for the different outcomes of the comparison. if else is used for cases where there are two outcomes, if elseif else conditions are used for 3 outcomes, and switch/cases are used for if you have a lot of iterations to compare back to back.