What are some common mistakes to avoid when using if-statements in PHP, as seen in the provided code snippet?

One common mistake to avoid when using if-statements in PHP is not properly closing the if block with curly braces {}. This can lead to unexpected behavior and errors in your code. To avoid this issue, always make sure to enclose the code block within the if-statement in curly braces.

// Incorrect way of using if-statement without curly braces
if ($condition)
    echo "Condition is true";
    echo "This line will always be executed";

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