This is my code:
Code: Select all
$tutorial = htmlentities($tutorial);
$tutorial = preg_replace("/<(acronym|b|code|i|q|u)>/", "/<(acronym|b|code|i|q|u)>/", $tutorial);The problem is that when it finds an occurance of one of these types of tags, it replaces it with /<(acronym|b|code|i|q|u)>/.
Is there a way to set some sort of place holder to the replacement regex knows what tag it's modifying?
ex.
Tutorial has <acronym> in it
htmlentities tranfers it to <acronym>
preg_replace finds <acronym>, remembers that 'acronym' is the text and replaces it with <acronym>