Conditions

If/Else Example

You passed!

Switch Example

Start of the week.

Conditions let PHP run different code depending on what is true. If/else checks one condition and decides what to show. Switch is used when a variable has several possible values and you want to act based on which one it matches.