Developers Heaven Forum
Web Programming => PHP & Perl => Topic started by: admin on May 28, 2010, 09:05:12 AM
-
Hi all,
if you want to cvonvert your forum code, vbcode or bbcode to regular text in order to display in your hame page or any where else, you can use the following:
function stripBBCode($text_to_search)
{
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
return preg_replace($pattern, $replace, $text_to_search);
}
echo stripBBCode($text);