[ÇÔ¼ö] ¿øÇÏ´Â tag¸¸ Á¦°ÅÇϱâ |
|
|
![](icon/private_name/1.gif) |
13³â Àü |
http://kr.php.net/manual/kr/function.strip-tags.php
function strip_only($str, $tags) {
if(!is_array($tags)) {
$tags = (strpos($str, '>') !== false ? explode('>', str_replace('<', '', $tags)) : array($tags));
if(end($tags) == '') array_pop($tags);
}
foreach($tags as $tag) $str = preg_replace('#</?'.$tag.'[^>]*>#is', '', $str);
return $str;
}
|
|
̵̧ : 243 |
̵̧
¸ñ·Ï
|
|