I read on php.net site and see a lot of code there try to echo " ". What is the point of doing so, because we need to view source to see new break. Why don't just simply use <br />
tag?
Possibly the program is intended to be run from a command-line, rather than a browser?
Possibly it is run in a browser, but output as text/plain
?
Possibly it is in HTML, but printed inside a <pre>
tag?
Possibly it's just because the author wanted to have it looking neat when he does "View Source" from the browser.
When you run script from console with using
<br />
you don't see breakline just these symbols
Php output does not need to be HTML, it can be anything. If PHP is run from console, <br />
would be displayed as <br />
, while " "
are newlines.