Conditions in PHP

If / Else Example

Score: 82 — Not an A (below 90)

Switch / Case Example

Day number is 3 — Wednesday

Explanation (30+ words)

Conditions let a program make decisions instead of always running the same steps. An if/else statement runs one block when a condition is true and a different block when it is false. A switch/case statement compares a value to multiple cases and runs the matching case, which is helpful for menus or categories.