Custom Markup Code - Part 1Category: PHP
Reviewed by: Chiggins
Reviewed on: Nov 01 2008
» Discuss this topic ( Posts)
Before we dive into code, we need to learn a bit about markup. Its format is very similar to normal HTML. When a member types a message using markup codes, its stored in the datebase as markup. But when you go to view a post, when the markup is returned from the databse, its converted to HTML, and then displayed.
For an example, we will use a bold statement.
This is a [b]bold[/b] statement
Now, when this is fetched from the database, and using our special markup conversion function, it would be outputted as:
This is a <strong>bold</strong> statement
Now, were are going to take a look at our base function to convert markup.