PHP – elseif Statements

elseif statements allow you to check to see if any of a number of conditions are true before failing out to the else in an if statement.


$age = 43;

print "Your Age is $age";
print "<br>";

if ($age < 18) {
	print "you too YOUNG";
}elseif ($age > 65) {
	print "You're TOO Old";
}else {
	print "You Can Enter";


Be the first to comment

Leave a Reply