public static function stripTags($html, $allowable = [])
    {
        if (!is_array($allowable)) {
            $allowable = preg_split("/, */", $allowable, -1, PREG_SPLIT_NO_EMPTY);
        }

        if ($allowable) {
            return strip_tags($html, '<' . implode('><', $allowable) . '>');
        }

        return strip_tags($html);
    }
public static function stripTags($html, $allowable = [])
    {
        if (!is_array($allowable)) {
            $allowable = preg_split("/, */", $allowable, -1, PREG_SPLIT_NO_EMPTY);
        }

        if ($allowable) {
            return strip_tags($html, '<' . implode('><', $allowable) . '>');
        }

        return strip_tags($html);
    }
public static function stripTags ( $ html , $ allowable = [ ] ) { if ( ! is_array ( $ allowable ) ) { $ allowable = preg_split ( "/, */" , $ allowable , - 1 , PREG_SPLIT_NO_EMPTY ) ; } if ( $ allowable ) { return strip_tags ( $ html , '<' . implode ( '><' , $ allowable ) . '>' ) ; } return strip_tags ( $ html ) ; }
Remove tags.

@param string       $html
@param string|array $allowable [optional] Tags to keep.

@return string
Remove tags .