PHP If-else-elseif and Switch-case

## What is `if` in programming language.
`if` is a very important feature of any programming language. It’s used to execute conditional statement based on any condition. In PHP, here is the structure of an if-statement.

“`php
if (condition or any expression that returns boolean(true or 1 or false or 0)) {
// This will be executed, if condition equal to true
}
“`

### Example of an if-statement:
“`php
18) {
echo “You are an Adult !”;
}

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top