PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Win Aung Cho   PHP Convert BBCode to HTML   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Convert BBCode to HTML
Parse BBCode and render it on a HTML Web page
Author: By
Last change:
Date: 9 months ago
Size: 1,233 bytes


Class file image Download

 * example for the use of BBCode2HTML Class
 * This class is free for the educational use as long as maintain this header together with this class.
 * Author: Win Aung Cho
 * Contact
 * version 1.0 10-12-2022
 * Date: 10-12-2022
$post = <<<EOD
[img h=200 w=300][/img][hr/]
[a href=""]phpBLOG[s][b]Site[/b][/s][/a][hr/]
[img w=350 src="" /]
[a ref=''][h1]Author's HOME[/h1][/a]
[table w=600 border="1" bg="#dff" c=green]
[tr][th cspan=3]Sample Table[/th][/tr]
[tr][td]Item one[/td][td a=right]345.67[/td][td]in $[/td][/tr]
[tr][td]Item two[br/]next line[/td][td a=center][b]two[/b][/td][td bg=red a=right]format[/td][/tr]

[li c="blue"]Main[/li]
[li]Heading 1[/li]
[li]item 1[/li]
[li]item 2
[ul][li][a ref='']link 1[/a][/li]
[li][a ref='']link 2[/a] [/li]
[li]item 3[/li]

$bb2html = new BBCode2HTML();