How to encode the html entities using php
I am using ck editor to compose my mail , to send mails to my user I am using the libmail class. my issue is if I echo the posted data from the ckeditor eg: echo $message = $_POST['editor1'];
output : " < data > " but if I send the message using the libmail the mail sended like this<p>
" < data > "</p>
<br />
I already tried this combination:
1 . $message = strip_tags($message);
2 . $message = htmlentities($message,ENT_NOQUOTES,'UTF开发者_C百科-8'); 3 . $message = htmlspecialchars(stripslashes(strip_tags($message)));Still I could not able to solve this issue.
You tried the encoding functions. What you need is the decoding ones.
http://www.php.net/manual/en/function.html-entity-decode.php or http://php.net/manual/en/function.htmlspecialchars-decode.php
精彩评论