Markup
Parsers
bbCode
| Markup | HTML | Class | Description |
| [b]Text[/b] | <strong>text</strong> | n/a | Strong (bold) text |
| [i]Text[/i] | <em>text</em> | n/a | Emphasized (italic) text |
| [u]Text[/u] | <u>text</u> | n/a | Underlined text |
| [url=link]Text[/url] | <a href="link">text</u> | n/a | Link to another site |
| [image=src] | <img src="src"> | n/a | Insert image |
Wiki
| Markup | HTML | Class | Description |
| = Text = | <h1>text</h1> | n/a | First level heading |
| == Text == | <h2>text</h2> | n/a | Second level heading |
| === Text === | <h3>text</h3> | n/a | Third level heading |
| '''Text''' | <strong>text</strong> | n/a | Bold/strong text |
Safe HTML
Human
| Markup | HTML | Class | Description |
| *word* | <strong>word</strong> | n/a | Bold/strong text |
| _word_ | <underline>word</underline> | n/a | Underlined text |
| /word/ | <em>word</em> | n/a | Italic/Emphasized? text |
| #word | n/a | n/a | Tag |
| !word | n/a | n/a | Group |
| @word | n/a | n/a | Addressing |
Using
// Parse $text and output the parsed version
$p = Markup::parse('bbcode',$text);
echo $p;
// Alternative way
$p = Markup::getParser('bbcode');
echo $p->parse($text);
}}}
