//隐藏身份证中间位数
$cardNo = 372922199001017878
$cardNo = preg_replace("/(\d{3,4})\d{11}(\d{1,2})/", "\$1***********\$2", $cardNo);
//$cardNo = 3729***********878
//隐藏手机号中间位数
$tel = 15666666666
$tel = substr_replace($tel, "****", 3, 4);
//$tel = 156****6666
//去除html标签
$content = '<p>
甲乙双方经过充分协商,就乙方为甲方提供病人陪护的服务的事项,一致达成以下协议
</p>';
$textHtml = strip_tags($content);
php 隐藏身份证 手机号中间位数,去除html标签
最新推荐文章于 2023-09-14 17:08:41 发布