lol - I still have not a clue whats going on here...
PHP Code:
<?
$col=array(x=>"<font color=\"#006400\">",b=>"<font color=\"#00008B\">",c=>"<font color=\"#008B8B\">",
g=>"<font color=\"#006400\">",m=>"<font color=\"#8B008B\">",r=>"<font color=\"#8B0000\">",w=>"<font color=\"#808080\">",
y=>"<font color=\"#808000\">",B=>"<font color=\"#0000FF\">",C=>"<font color=\"#OOFFFF\">",G=>"<font color=\"#00FF00\">",
M=>"<font color=\"#FF00FF\">",R=>"<font color=\"#FF0000\">",W=>"<font color=\"#FFFFFF\">",Y=>"<font color=\"#FFFF00\">",
D=>"<font color=\"#636363\">");
$str="NSTR Siara: (long) {xA {Ws{wi{Dlve{wr{Wy {xbladed shortsword with a {Cc{cr{wy{Cs{wt{ca{Cl {xhilt{x belongs to Siara.";
$str=eregi_replace("\{([a-z]{1})","</font>{\".\$col[\\1].\"",$str);
echo htmlspecialchars($str);
echo "<br /><br />";
eval("echo \"$str\";");
?>
does some interesting stuff, but I am unsure where and when you want the font colours to appear and around what??
i.e.
is '{Ws'
supposed to translate to
{<font colour='#whatever'>s</font> ??
anyway the above may help?
it actually begs another question,
I a unsure how to achieve this within the ereg statement (which is why I eval'led)
$str=eregi_replace("\{([a-z]{1})","{$col[\\1]",$str);
'$col[\\1]' throws an error but there must be a way of achieving this??