Voici une fonction simple afin de supprimer des balises HTML en PHP :
function removeTag($html, $tag) {
return preg_replace('#</?'.$tag.'[^>]*>#is', '', $html);
}
Exemple d'utilisation :
$html = "<p><span class='bold'>Texte en gras</span></p>";
echo removeTag($html, $tag);
// Affichera '<p>Texte en gras</p>'