12 Years
Discussion Span
Last Post by tgreer

No, but it is a variation on it.
For example, [ b ]this text is bold![ / b ] is the same as <b>this text is bold</b> in html.

Note that I've put spaces in the bbcode so as it's not picked up.


bb code is not html, it you wrote it in PHP it might look something like this:

$message = preg_replace("#\[b\](.*?)\[/b\]#","<b>\\1</b>",$message);

it's not pretty if you don't know much about regular expressions. Granted there are other ways of doing this, but this is a nice one-liner


BBhtml code is a simple implementation of Html code, it quiclkly allows you to change the basic style of your text.


That is not correct. BBCode is NOT an "implementation of HTML". That would require that it have it's own DTD or schema, doctype, etc. It isn't particularly simple, either, as it relies on PHP Regular Expressions. While powerful, regex isn't simple!

BBCode is short for "Bulletin Board Code", and is a tool developed, in PHP, and adopted by most if not all forum software vendors.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.