Are there any potential pitfalls in displaying text with line breaks in PHP and HTML?
When displaying text with line breaks in PHP and HTML, one potential pitfall is that HTML ignores line breaks in the source code. To ensure that line breaks are displayed correctly in the browser, you can use the `nl2br()` function in PHP to convert newline characters to HTML line breaks `<br>`.
<?php
$text = "This is a text with\nline breaks.";
echo nl2br($text);
?>