PHP custom function: remove all html tags function pregstring($str){ $strtemp = trim($str); $search = array( "||Uis", "|].*?< /script>|Uis", // Remove javascript</li> <li> "|[Word definition].*[/Word definition]|Uis", // Remove thumbnail </li> <li> "|<[ /!].*?[^<>]*?>|Uis", // Remove the HTML tag </li> <li> ">(quot|#34);i", // Replace the HTML entity </li> <li> ">(amp|#38);i",</li> <li> "|,|Uis",</li> <li> "|[s]{2,}|is" ,</li> <li> “[>nbsp;]isu”,</li> <li> “|[$]|Uis”,</li> <li> );</li> <li> $replace = array (</li> "` ", <li> </li>" ", <li> </li>" ", <li> </li>" ", <li> </li>" ", <li> </li> "",<li> "",<li> " ",<li> " ",<li> " ",<li> ); <li> $text = preg_replace($search, $replace, $strtemp);<li> return $text;<li>}<li>echo pregstring(string) ; //Call function <li>?><li> <li> </ol></div> <br> <p align="left"></p> <div style="display:none;">http://www.bkjia.com/PHPjc/486145.html<span id="url" itemprop="url"></span>www.bkjia.com<span id="indexUrl" itemprop="indexUrl"></span>true<span id="isOriginal" itemprop="isOriginal"></span>http: //www.bkjia.com/PHPjc/486145.html<span id="isBasedOnUrl" itemprop="isBasedOnUrl"></span>TechArticle<span id="genre" itemprop="genre"></span>PHP custom function: remove all html tags?php function pregstring($str){ $strtemp = trim($ str); $search = array( "||Uis", "|script[^].*?/script|Uis", // Remove javascript "|[字定...<span id="description" itemprop="description"></span> </div> <div class="art_confoot"></div>