Web Programming > PHP & Perl
How to remove your forum bbcode or vbcode formate?
(1/1)
admin:
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:
--- Code: ---function stripBBCode($text_to_search)
{
$pattern = '|[[\/\!]*?[^\[\]]*?]|si';
$replace = '';
return preg_replace($pattern, $replace, $text_to_search);
}
echo stripBBCode($text);
--- End code ---
Navigation
[0] Message Index
Go to full version