Jump to content

New Line (line feed) in PHP


Memon

Recommended Posts

Hello All

 

I am using a button in my script to send the email. It sends the email, but I can not set multiple lines in email body.

 

My script is like this;

 

$sub="Order for Item No:".$item_no;
$body = $sub."./n Name: /n Tel No:";

echo "<input type='button' value='Order This Item' onClick=\"parent.location='mailto:[email protected]?subject=$sub&body=$body'\">";

 

I want "Item No" , "Name" & "Tel No" in separate lines in the mail body, but it all comes in a single line.

 

Can someone guide me.

Link to comment
https://forums.phpfreaks.com/topic/190432-new-line-line-feed-in-php/
Share on other sites

Memon I am having the same problem on my submit information to email script. I have 4 lines of information as seen below ($name, $customer_mail, $phone, $location). how would I make those show up on seperate lines?

 

mail( "[email protected]", "Contact Form Results", $emailMessage, "$name, $customer_mail, $phone, $location" ); 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.