Are you sure that the problem isn't just the browser ignoring the whitespace? If you view the source code of the page you will likely find the line breaks in where you expected them to be.
Note that you can tell PHP to send out a straight-up text file (so the browser displays it into a monospaced font and never ignores whitespace) by changing the content-type as so:
Hope that helps
"60% of the time it works... every time." -- Paul Rudd as Brian Fantana.