string strip_tags ( string $str [, string $allowable_tags ] )
<?php
$text = '<label class="mr20" for="atc_html"><input type="checkbox" name="atc_html" id="atc_html" value="1" onclick="editor.setHtmlMod
e(this)" />使用HTML代码</label>';
echo strip_tags($text);
print "\n";
echo strip_tags($text, "<label>");
?>
[beyes@beyes php]$ php strip_tags.php
使用HTML代码
<label class="mr20" for="atc_html">使用HTML代码</label>
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |