PHP - Conditional Statements
Find the error in this PHP code snippet:
<?php
$age = 20;
if ($age > 18) {
echo "Adult";
} elseif $age >= 13 {
echo "Teenager";
} else {
echo "Child";
}
?>Find the error in this PHP code snippet:
<?php
$age = 20;
if ($age > 18) {
echo "Adult";
} elseif $age >= 13 {
echo "Teenager";
} else {
echo "Child";
}
?>15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions