What are some common pitfalls to avoid when using conditional statements in PHP?

One common pitfall to avoid when using conditional statements in PHP is not properly handling all possible cases, leading to unexpected behavior or errors. To solve this, always consider all possible scenarios and include appropriate conditions to cover them.

// Example of properly handling all possible cases in a conditional statement
$number = 10;

if ($number > 10) {
    echo "Number is greater than 10";
} elseif ($number < 10) {
    echo "Number is less than 10";
} else {
    echo "Number is equal to 10";
}