Using PHP how can i apply HTMLentities() to a backreference in a preg_replace() call?
- by Gary Willoughby
At the minute i have:
$Text = preg_replace("/\[code\](.*?)\[\/code\]/s", "<mytag>\\1</mytag>", $Text);
how can i escape the backreference using htmlentities()?