'New line' symbol for writing e-mail text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

'New line' symbol for writing e-mail text

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

try "\n"
mjseaden
Forum Contributor
Posts: 458
Joined: Wed Mar 17, 2004 5:49 am

Post by mjseaden »

Hi Feyd,

Do you mean I should use double quotes " instead of single quotes ' ?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Show your code

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

Mark
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post 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
?>
Post Reply