Hey Paul,
Wouldn't something like this work?
$string =
str_replace("","<B>",
str_replace("","</B>",
str_replace("","<I>",
str_replace("","</I>",
$string))));
Now, in your program when you type out something like:
He said, "This is really cool!"
It should work. Hope this helps,
Andrew