php - html_entity_decode not working for the first time -
i have string of html want decode , strip off html tag before sending them out through email.
here's string :
<p>this test <em>please </em><strong>ignore </strong>it >< , thank you.</p>
after decode , strip off html tags using html_entity_decode , strip_tags still html entities left.
strip_tags(html_entity_decode($str)); //got result test please ignore >< , thank you.
only doing html_entity_decode give me correct result:
html_entity_decode(strip_tags(html_entity_decode($str)));
- the string taken directly post variable of ckeditor.
i don't understand why first html_entity_decode doesn't trick , need html_entity_decode. please explain me?
thanks in advance.
Comments
Post a Comment