What are best practices for structuring if-else statements in PHP?

When structuring if-else statements in PHP, it is important to follow best practices to ensure readability and maintainability of your code. One common approach is to use curly braces {} for all if-else blocks, even if they contain only one statement. This helps improve code clarity and reduces the risk of errors. Additionally, it is recommended to use indentation to clearly show the hierarchy of nested if-else statements.

// Example of structuring if-else statements in PHP
if ($condition1) {
    // Code block for condition1
} elseif ($condition2) {
    // Code block for condition2
} else {
    // Code block for default condition
}