按照你的要求编写的把section标签替换成div标签的例子程序如下
<?php
$str='<section style="font-size:16px;"><section class="_135editor"><p><strong class="135brush" style="box-sizing:border-box;">纪元龙虾</strong></p></section></section>';
$result=preg_replace('/<section/','<div',$str);
$result=preg_replace('/<\/section/','</div',$result);
echo $result;
?>
运行结果
<div style="font-size:16px;"><div class="_135editor"><p><strong class="135brush" style="box-sizing:border-box;">纪元龙虾</strong></p></div></div>
温馨提示:答案为网友推荐,仅供参考