You could probably do it kind of like this:
$str = 'this is a string with [bold]bold[/bold] text';
$str = preg_replace('/(\[bold\])/', '<strong>', $str );
$str = preg_replace('/(\[\/bold\])/', '</strong>', $str );
echo $str;
I'm not great at regex, so I'm sure some wizard can combine my two statements into one, but this is the general idea. Just replace any bbcode with the proper html?