Having a problem with the following code I created:
$new_reply = preg_replace_callback("/[CODE](.*)[CODE]/", create_function('$matches', 'return highlight_string($matches[1], 1);'), $new_reply);
What it's supposed to do is replace for example [ CODE ] some text [ / CODE ] by highlight_string("some text") (returning that text highlighted to the variable $new_reply).
Why aint it working? Any suggestions?
Thanks in advanced~!
Cheers.
Edited by John, 09 April 2010 - 09:35 PM.


Sign In
Create Account


Back to top









