Can't get \n or \r command to work
Posted: Thu Feb 12, 2009 6:03 pm
Sorry if this one's a waste of time, I've done a search for a similar question - I'm a complete novice and I've just finished configuring my first WAMP test site. Working through a tutorial, I thought I had covered all the general php.ini setup issues, however when running simple test code:
<?php
// sample text here
$output = "This is one line.\n And this is another line.";
echo $output;
?>
...returns this in the browser (next line and carriage return characters don't work):
This is one line. And this is another line.
Have I missed something in my configuration?
<?php
// sample text here
$output = "This is one line.\n And this is another line.";
echo $output;
?>
...returns this in the browser (next line and carriage return characters don't work):
This is one line. And this is another line.
Have I missed something in my configuration?