Ver originalforeach($contenido as $key => $value) { $replace["{\$".$key."}"] = htmlspecialchars_decode(htmlentities(strip_tags($value, "<p><span><strong><br>"),ENT_QUOTES | ENT_IGNORE, "UTF-8")); }