Created
June 21, 2023 14:31
-
-
Save SitesByYogi/d70a6f5a711631a377321a2317d29012 to your computer and use it in GitHub Desktop.
PHP Conditional Statements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$age = 18; | |
if ($age >= 18) { | |
echo "You are an adult."; | |
} elseif ($age >= 13 && $age < 18) { | |
echo "You are a teenager."; | |
} else { | |
echo "You are a child."; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment