How can echoing content within an else statement in PHP be a better practice than breaking the code with HTML tags?

When echoing content within an else statement in PHP, it keeps the logic and output generation within the PHP code, making the code cleaner and more maintainable. Breaking the code with HTML tags can lead to mixing logic with presentation, making it harder to debug and maintain.

<?php
$condition = true;

if ($condition) {
    // Code block for true condition
    echo "Condition is true";
} else {
    // Code block for false condition
    echo "Condition is false";
}
?>