 |
|
|  |
|
 |
15년 전 |
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;
} |
|
추천 : 608 |
추천
목록
|
|
|  |
|