Hello
I have a load of text as an IF/ELSE output that I echo out on the website to show feedback from a user submitted form.
this is $body, I want to incorporate $body in the text of an e-mail so I have got
$text = "$Name, <br><br>Thank you for taking the time to complete the Assessment.<br>
Here is a record of your feedback. <br><br>
$body<br><br>
thanks & regards,<br>
Sams Training<br>";
mail ("$Email", "Leadership Assessment Feedback", "$text");
this works OK but I get all the html tags that I used in $body to format the text for the website.
example of e-mail output
Liz, <br><br>Thank you for taking the time to complete the Assessment.<br>
Here is a record of your feedback. <br><br>
-----------------------------<p></p>
<p>Question 1 - You got this correct. A ... etc.etc.
I reckon I need strip_tags() to remove the <br> and <p> etc.etc. but I dont know where to put it in relation to the mail() function.
I have tried
mail ("$Email", "Leadership Assessment Feedback", "strip_tags($text)");
but this doesn't work, so where do I put it?
Also how can I format this e-mail output so that is has line breaks (invisible) so that the text isnt all on one long line?
thanks in advance