PHP - Removing the effect of HTML tags in string - BUT displaying them as well?
Posted
by wretrOvian
on Stack Overflow
See other posts from Stack Overflow
or by wretrOvian
Published on 2010-05-05T19:20:05Z
Indexed on
2010/05/05
19:28 UTC
Read the original article
Hit count: 251
Hi.
Consider strip_tags() .
strip_tags("<b>TEXT</b>");
Output:
TEXT
But what if i want to nullify the effect of the tags but display them as well?
Output:
<b>TEXT</b>
Would i have to use preg_replace() ? Or is there a more elegant solution available?
Thanks :D
© Stack Overflow or respective owner