Conditions.php

if/else condition

The hidden number is greater that 5!

PHP case example

Your favorite color is not pink, purple, or blue! Which color is it?

In the if/else condition example, if/else statements are used to execute certain pieces of code based off of parameters set up bu the user. In this case, the if/else statement evaluated the 8 variable in order to see if it was greater than 5 or not. When it detects that the number is greater that 5, the statement 'The hidden number is greater that 5!' will print out
In the second example (the switch condition), the switch statement will evaluate a variable, and will go through each case to see if the variable's value matches the case's value/requirement. If the variable doesnt match up with any of the cases, it will run/print the default case