PHP 5 - Why does this print statement not do what I expect?

Smith

New member
I have the following print statement written in PHP

<?php
print "This spans\nmultiple lines. The newlines will be\noutput as well.";
?>

When I test the script I get the following output in the broweser

This spans multiple lines. The newlines will be output as well.

However the tutorial I am following insists it should come out like

This spans
multiple lines.The newlines will be
output as well.

This does in the source but not when displayed in the browser can you explain why please?
 
Back
Top