Back to PhocaGalleryComment class

Method closeTags

public static
closeTags
(mixed $comment, mixed $tag, mixed $endTag)

Method closeTags - Source code

public static function closeTags($comment, $tag, $endTag)
{
    if (substr_count(strtolower($comment), $tag) > substr_count(strtolower($comment), $endTag)) {
        $comment .= $endTag;
        $comment = PhocaGalleryComment::closeTags($comment, $tag, $endTag);
    }
    return $comment;
}