PHPstr_replace replace multiple sensitive words [urgent, online, etc.] This post was last edited by u011123799 from 2013-06-1912: 42: 46 $ html & nbsp ;=& nbsp; htmlReplace ($ body, & nb PHP str_replace replace multiple sensitive words [urgent, online, etc]
This post was last edited by u011123799 at 12:42:46
$ Html = HtmlReplace ($ body, 0); // filter
Echo $ html; // The output content is:
// Compile it into HTML:
/************* The above background *************/
$ Html = str_replace (" "," ", HtmlReplace ($ body, 0 ))
After the replacement, the output is normal, but the problem arises!
I want to replace multiple tags, such :,
,
- ...
It's silly to write one by one! Is there any way to define the content required for replacement at a time?
For example:
=
=
- =
Beginner
PHP Palm? Pre HTML:
------ Solution --------------------
Echo htmlspecialchars_decode ($ html, ENT_QUOTES );
------ Solution --------------------
#1 specifically deals with html tags
You can also use arrays and regular expressions.