i have a text saved in variable and part of that var has [CCODE] in it. that CCODE should split the text between CCODE tags in variable and use the php function highlight_string on it..
here is how i wanted to do that:
but it just doesn't work..PHP Code:
$patterns = array();
$replacements = array();
// code [ccode] to color code (highlight_string()<img src="images/smilies/wink.gif" border="0" alt="">
$patterns = "#[CCODE](.*?)[/CCODE]#si";
$replacements = "<hr>". highlight_string(\1) ."<hr>";
$text = "
blah blah blah
$text = preg_replace($patterns, $replacements, $text);
can someone please help me with that? please, please,..
thank you very much all :P