Mike Lewis
Programmer
I'm a novice in PHP, so please bear with me if I ask a very basic question.
I simply want to print a string with a newline in the middle. This is what I am doing:
According to everything I've read, that should produce the desired output. But what I see in the output is this:
The \n is eaten, but not processed. There is exactly one space between "line" and "And". I've checked that it's a backlash, not a forward slash, and the string is delimited with double-quotes.
Can someone please explain to me what I am doing wrong.
By the way, this is PHP 5.2.5, running under Linux.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk
I simply want to print a string with a newline in the middle. This is what I am doing:
Code:
<?php
echo "This is the first line \n And this is the second";
?>
According to everything I've read, that should produce the desired output. But what I see in the output is this:
Code:
This is the first line And this is the second
The \n is eaten, but not processed. There is exactly one space between "line" and "And". I've checked that it's a backlash, not a forward slash, and the string is delimited with double-quotes.
Can someone please explain to me what I am doing wrong.
By the way, this is PHP 5.2.5, running under Linux.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
My Visual FoxPro site: www.ml-consult.co.uk