Example of PHP if/else condition

Golden Retriever has more characters than Beagle

Example of PHP Case

The sum (17) was correctly added!

Explanation of how cases work


Conditions work by testing a boolean condition (with an operator). If it's true, it performs the statement in the if block. If not, it performs the statement in the else block (or in the elseif blocks if they exist and are True).