<?php $html = "<code><b> It's bold </b></code>"; print preg_replace('@<code>(.*?)</code>@e',"html_entity_decode('$1')", $html); print "\n"; $html = '<code><i> "This" is italic. </i></code>'; print preg_replace('@<code>(.*?)</code>@e',"html_entity_decode('$1')", $html); print "\n"; ?>