时间:2021-07-01 10:21:17 帮助过:42人阅读
$wenzis="我是<图片1>";$wenzi="黑色"; $tihuanzhi = "<图片1>"; //要替换的值 $wenzis = preg_replace($tihuanzi, $wenzi, $wenzis,1);
$wenzis = "我是<图片1>";$wenzi = "黑色";$tihuanzhi = "/<图片1>/"; //要替换的值$wenzis = preg_replace($tihuanzhi, $wenzi, $wenzis,1);echo $wenzis;我是黑色
搞定了,谢谢