library/Helper/Html.php
public static function getHtmlTags($content, $closeTags = true)
    {
        if ($closeTags == true) {
            $re = '@<[^>]*>@';
        } else {
            $re = '@<[^>/]*>@';
        }

        preg_match_all($re, $content, $matches, PREG_SET_ORDER, 0);

        if (isset($matches) && !empty($matches)) {
            $tags = array();
            foreach ($matches as $match) {
                $tags[] = $match[0];
            }

            $tags = array_unique($tags);

            return $tags;
        }

        return;
    }
public static function getHtmlTags($content, $closeTags = true)
    {
        if ($closeTags == true) {
            $re = '@<[^>]*>@';
        } else {
            $re = '@<[^>/]*>@';
        }

        preg_match_all($re, $content, $matches, PREG_SET_ORDER, 0);

        if (isset($matches) && !empty($matches)) {
            $tags = array();
            foreach ($matches as $match) {
                $tags[] = $match[0];
            }

            $tags = array_unique($tags);

            return $tags;
        }

        return;
    }
public static function getHtmlTags ( $ content , $ closeTags = true ) { if ( $ closeTags == true ) { $ re = '@<[^>]*>@' ; } else { $ re = '@<[^>/]*>@' ; } preg_match_all ( $ re , $ content , $ matches , PREG_SET_ORDER , 0 ) ; if ( isset ( $ matches ) && ! empty ( $ matches ) ) { $ tags = array ( ) ; foreach ( $ matches as $ match ) { $ tags [ ] = $ match [ 0 ] ; } $ tags = array_unique ( $ tags ) ; return $ tags ; } return ; }
Get HTML Tags
@param string $content String to get HTML tags from
@param  boolean $closeTags Set to false to exclude closing tags
@return array       Htmltags
Get HTML Tags