What are some common mistakes beginners make when using if-else statements in PHP?

One common mistake beginners make when using if-else statements in PHP is forgetting to use curly braces {} for multiple lines of code within the if or else block. This can lead to unexpected behavior or errors in the code. To avoid this issue, always enclose multiple lines of code within the if or else block in curly braces.

// Incorrect way without curly braces
if ($condition)
    echo "Condition is true";
    echo "This line is always executed";

// Correct way with curly braces
if ($condition) {
    echo "Condition is true";
    echo "This line is only executed if the condition is true";
}