How should conditional statements like if/else be correctly structured in PHP to avoid errors and confusion?

When writing conditional statements like if/else in PHP, it's important to ensure proper syntax and structure to avoid errors and confusion. Each condition should be enclosed in parentheses, and the statements within the if and else blocks should be enclosed in curly braces. Additionally, make sure to use the correct comparison operators and maintain consistent indentation for readability.

// Example of correctly structured if/else statement
$number = 10;

if ($number > 5) {
    echo "Number is greater than 5";
} else {
    echo "Number is 5 or less";
}