
Admin
Well-Known Member
Staff member
Administrator
Nghe cái tên chắc là biết chức năng rồi phải không.
Code 1:
The main goal behind bb2html.php was speed and simplicity thus the syntax was made more rigid to accomodate those goals (see below). To achieve this speed we exclusively used the function str_replace over preg_replace (regular expression). Benchmarking those two functions shows around a 3 to 4 fold speed increase.
[*]The bbcode
Code 1:
The main goal behind bb2html.php was speed and simplicity thus the syntax was made more rigid to accomodate those goals (see below). To achieve this speed we exclusively used the function str_replace over preg_replace (regular expression). Benchmarking those two functions shows around a 3 to 4 fold speed increase.
[*]The bbcode
- does NOT take parameters and only produces the unordered HTML list
- The bbcode REQUIRES the parameter url-address...i Munajim
// website: [url]http://elouai.com
// date: 2004/Apr/18
function bb2html($text)
{
$bbcode = array("",
"- ", "
- ", "
"
"", "",
"", "",
"", "",
'[color="', "[/color]",
"[size=\"", "[/size]",
'[url="', "[/url]",
"[mail=\"", "[/mail]",
"[code]", "[/code]",
"",
'"]');
$htmlcode = array("<", ">",
"- ", "", "
"",
"", "",
"", "",
"", "",
"