What is the difference between using "if" and "elseif" statements in PHP and when should each be used?

When using "if" statements in PHP, each condition is evaluated independently. This means that if one condition is true, the subsequent conditions are not checked. On the other hand, "elseif" statements are only evaluated if the preceding "if" condition is false. "elseif" statements are useful when you have multiple conditions that are mutually exclusive, while "if" statements are used when each condition should be evaluated independently.

$age = 25;

if($age < 18){
    echo "You are a minor.";
} elseif($age >= 18 && $age < 65){
    echo "You are an adult.";
} else {
    echo "You are a senior citizen.";
}