What are the best practices for handling line breaks in PHP when generating HTML output?

When generating HTML output in PHP, it's important to handle line breaks properly to ensure readability and maintainability of the code. One common approach is to use the PHP_EOL constant to represent the appropriate line break character based on the operating system. This ensures that line breaks are consistent across different platforms.

<?php
// Using PHP_EOL to handle line breaks
$html_output = "<p>This is a paragraph.</p>" . PHP_EOL;
$html_output .= "<p>This is another paragraph.</p>" . PHP_EOL;

echo $html_output;
?>