Hi guys,
sorry for the unclear explanation, let me start all over again.
is there any ways to STOP replacing the string if it's a bbcode?
Because I'm replacing a,b,c,d...etc to some other language, so when the bbcode(), is used, that letter "B" also getting replaced, means cannot BOLD a word/text.
i.e:
//language translation
$words = str_replace("A", "foo", "$words");
$words = str_replace("B", "bar", "$words");
//sample bbcode replacement to bold the text
$words = str_replace("[ B ]", "<B>", "$words");
$words = str_replace("[ /B ]", "</B>", "$words");
//output/ should be <B>Text</B> but INSTEAD...
//none bold text.. cuz bbcode is replaced too...
<bar>Text</bar>