/ Published in: PHP
Simply call the function by passing your string you wish to parse. To convert the parser to HTML to BB Code, change this line:
$newtext = str_replace($bbcode, $htmlcode, $text);
to
$newtext = str_replace($htmlcode, $bbcode, $text);
$newtext = str_replace($bbcode, $htmlcode, $text);
to
$newtext = str_replace($htmlcode, $bbcode, $text);