mysqli line breaks
I am no开发者_开发知识库t understanding how to eliminate the returns and new lines that are showing up in my emails that I am using PHPMailer.
I start with mysqli_real_escape_string($link, $_POST['message']);
and then I echo this in the HTML body of the email and it returns something like this:
Hi, This is another testrnrnRandy - Done
What do I need to do so that the return new line actually shows up and the rn does not?
Thank you for your help
Don't use mysqli_real_escape_string
, but nl2br
.
Use mysqli_real_escape_string
only to calculate values that are actually going to be used for constructing SQL queries.
精彩评论