Fungsi Untuk Menghilangkan HREF (block function)

<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
* File:     block.removehref.php
* Type:     block
* Name:     removehref
* Purpose:  strip <a href="URL">LINK</a> leaving the "LINK"
* -------------------------------------------------------------
*/
function smarty_block_removehref($params, $content, &$smarty)
{
    if ($params['on'] == 1) {
        if ($content) {
            $content = preg_replace("/<a href=.*?>(.*?)<\/a>/","$1",$content);
        }
    }
    echo $content;
}
?>