Just use strip_tags() to remove html and php from the string and then use ereg_replace() to replace the custom style codes with the html you want.
Alternately you could just use strip_tags() on it's own with a second argument to allow use of certain tags such as <B> and <IMG> for example. Check the php documentation for details.