This should actually be easier than you may think. Just use something like:
eregi_replace("[", "<", $postedData);
eregi_replace("]", ">", $postedData);
...and all special "vb-like" tags (eg [ b ]) will be replaced to < b > so that they are interpreted as HTML.
Of course, you'll need more extensive code in order to use special tags, such as [ code ]
You could use something like:
eregi_replace("[code]", "<hr><pre>", $postedData);
eregi_replace("[/code]", "</pre></hr>", $postedData);
Oh, yes...very important: notice the backslashes before the "[" and "]" characters in the eregi_replace functions. This is done because these characters have a special regex meaning (which is far to much to get into here)