Assignement 3 Part 9

Conditional statements in PHP are used to make certain decisions on specified conditions


If/Else statements: This statement checks a condition and if it remains true then it will execute the piece of code within the bloc k. But if the condition remains as False then it will execute the else block

Elseif statements: statement checks a condition, if it's true, it executes its block. If the condition is false, it checks the conditions in the elseif statements, and if one is true, its block is executed. If none of the conditions are true, the code inside the else block is executed.

Switch statements: statement allows you to select one of many blocks of code to be executed based on a given value. When one of the code case matches the value, then the block is executed but must break after each case. If no cases match "default" case will execute

You can't vote You got an CIt's the beginning of the week.