Author Topic: How to remove your forum bbcode or vbcode formate?  (Read 5189 times)

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
How to remove your forum bbcode or vbcode formate?
« 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:
Code: [Select]
function stripBBCode($text_to_search)

$pattern = '|[[\/\!]*?[^\[\]]*?]|si'; 
$replace = '';
return preg_replace($pattern, $replace, $text_to_search);

echo stripBBCode($text);