BigBadDave
Programmer
I want to make my own TGML parser
How do I search/replace TGML tags with HTML tags??
I can do basic ones ie :
but I want to do font tag etc where arguments will be used eg :
[ color green ] == <font color="green">
any advice appreciated Regards
Big Bad Dave
davidbyng@hotmail.com
How do I search/replace TGML tags with HTML tags??
I can do basic ones ie :
Code:
function parseTGML($string) {
$search = array ("/\[b\]/",
"/\[\/b\]/",
"/\[u\]/",
"/\[\/u\]/");
$replace = array ("<b>",
"</b>",
"<u>",
"</u>");
$rstring = preg_replace ($search, $replace, $string);
return stripslashes($rstring);
}
but I want to do font tag etc where arguments will be used eg :
[ color green ] == <font color="green">
any advice appreciated Regards
Big Bad Dave
davidbyng@hotmail.com