Remover todas as propriedades das tags

Published: 2019-08-04, Updated: 2019-08-04

$text = '<p style="padding:0px;"><strong style="padding:0;margin:0;">hello</strong></p>';
echo preg_replace("/<([a-z][a-z0-9]*)[^>]*?(\/?)>/i",'<$1$2>', $text);

Git Commands Softwares OpenSource

Comments