Jump to content

print the input in seperate line


bal bal

Recommended Posts

hi

i am getting inputs from HTML form using PHP and those are sending to me through email. now all the inputs are printing in the same line, can anyone please help me to print them in seperate line? here is all the code.


$body=$answer1.' '.$answer2.' '.$answer3;

$headers  = "MIME-Version: 1.0\r\n";

$headers .= "Content-type: text/html";

$headers .= "From: $name \r\n";

$sent=mail("{$to}", "{$subject}", "{$body}", "{$headers}"); 

 

 

now I need to print these answer in seperate line. can anyone please help me?

Link to comment
Share on other sites

thanks, but I am talking about the $body varialbe where the answers are stored, here it is called answer1 and answer2, so if the answer1 is hi and answer2 is how are you, then the result should be printed in two different lines like

hi

how are you

 

instead of hi how are you

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.