Page 1 of 1

'New line' symbol for writing e-mail text

Posted: Tue May 18, 2004 4:00 am
by mjseaden
Dear All,

I am trying to write an e-mail message, using the symbol '\n' to signify new line. However, when I come to send the e-mail message, '\n' actually appears in the e-mail text. How do I create a new line when writing e-mail text?

Many thanks

Mark

Posted: Tue May 18, 2004 4:12 am
by feyd
try "\n"

Posted: Tue May 18, 2004 4:14 am
by mjseaden
Hi Feyd,

Do you mean I should use double quotes " instead of single quotes ' ?

Posted: Tue May 18, 2004 4:19 am
by JayBird
Show your code

I don't think Feyd read your message to be honest, just answered the topic title!?!

Mark

Posted: Tue May 18, 2004 4:27 am
by feyd
no I read it. I meant double quotes.. I've had a few times where that or how I was using it was screwing up.

Posted: Tue May 18, 2004 5:33 am
by patrikG
The difference between single- and double-quotes is that PHP parses anything between double-quotes.

Code: Select all

<?php
$var = "hello";
echo '$var';

//will output: $var

echo "$var";

//will output: hello
?>