Better yet, just use nl2br()
The reason for this problem, sergio, is that when an HTML document is displayed in the browser, all whitespace (tabs, newlines, and multiple spaces) are converted to single spaces for display. This is intentional and the correct behavior of the browser. If you open your document in the brower and go to View > Source, you'll see that your newlines are still there; they're just not displayed. In order to do a line break in HTML, we have to use the <br/> tag, hence nl2br().