Making Decisions with Conditional Statements in PHP


Control the flow of your program with if-else statements.

Source Code

if ($age > 18) {
    echo "Adult";
} else {
    echo "Minor";
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments