Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPit.net:
Create your own BBCode, using PHP
Oct 17, 2005 @ 11:15:39

PHPit.net has a new tutorial posted today with a look at creating your own form of BBCode in your PHP application.

If you've ever been on a bulletin board then you've probably come across BBCode (Bulletin Board Code), the HTML-like tags that can be used to format your message. Most of the popular message board scripts, like vBulletin all have inbuilt support for BBCode.

In this tutorial, I'm going to show you how to create your own BBCode for your own PHP scripts. I will first present you with some easy BBCode's (such as [b], and [i]), and then I'll have a look at nesting BBCode.

You'll need to know a bit about how to use regular expressions to get the job done, but they give you all of the code and everything you'll need, so it's not too hard to just jump in. They go from the simple tags (single-level) to a method for nesting the tags, and wrap it all up with a live demo and a link to the BBCode function in their code snippets section...

tagged:

Link:


Trending Topics: