For a website, PHP (usually) produces HTML output. The browser (usually) condenses all whitespace in text into one space when displaying HTML. Sometimes it even collapses whitespace to nothing in between tags.
You must use special elements like or br/> in your HTML to add non-breaking whitespace or new lines, respectively, in order to convince the browser to show whitespace.