Creating a BBCode Parser
Have you ever wanted to implement BBCode, the special formatting codes used by forums, into your own PHP scripts? Well, it's actually pretty easy to accomplish using some simple regular expressions and the preg_replace PHP function. This mini-tutorial will show you how to create a function that you can use on any string to convert BBCode into its XHTML equivalent.