时间:2021-07-01 10:21:17 帮助过:4人阅读
$p1 = '/<(content)>(.*?)<\/\\1>/ise';
$r1 = '"<$1>".htmlspecialchars("$2", ENT_NOQUOTES)."$1>"';
$p1 = '/<(content)>(.*?)<\/\\1>/ise';
$r1 = '"<$1>".htmlspecialchars("$2", ENT_NOQUOTES)."$1>"';
echo preg_replace($p1, $r1, 'abcd>1234 ');