$1 is the same as \\1 just depends on what php editor you use
also the " " at the start and end of the replacement need removing
eg:
PHP Code:
$string = preg_replace('#\[php\](.*?)\[\/php\]#se', '<div>' . highlight_string(stripslashes('$1'), true) . '</div>', $string);
//some text here to get rid of opera bug and this forum :/
and htmlspecialchars_decode() if you have already used htmlspecialchars()
Originally posted by adex3g
View Post
Leave a comment: