What common syntax errors can occur when using if-else statements in PHP code?

One common syntax error when using if-else statements in PHP is forgetting to include the opening and closing curly braces for the block of code within the if or else statement. This can lead to unexpected behavior or errors in the code. To solve this issue, always ensure that the opening and closing curly braces are correctly placed to define the scope of the if or else block.

// Incorrect usage of if-else statement without curly braces
if ($condition)
    echo "Condition is true";
else
    echo "Condition is false";

// Corrected code with curly braces included
if ($condition) {
    echo "Condition is true";
} else {
    echo "Condition is false";
}