Timothy Yang - Activity 3

Conditions Demonstration

If/Else Example

You are 20 years old. You can not consume alcohol!

Switch/Case Example

Tuesday

Explanation

Conditions in PHP allow the program to make decisions based on certain criteria. An if/else statement executes different code blocks depending on whether a condition is true or false. A switch/case statement evaluates a variable against multiple values and executes the matching case. Conditions help control the flow of the program and make it dynamic based on data.