PHP多个字符串替换PHP
$nn="ab bc cd cd ab";
$tttt=str_ireplace("cd","aaa",$nn);
$tt=str_ireplace("ab","aaa",$tttt);
但下面的编码工作不
$nn="ab bc cd cd ab";
$tttt=str_ireplace("cd" or "ab","aaa",$nn);
输出为 “AAA BC AAA AAA AAA”。请帮我simplyfying it.because有对于各种单词来说,更多的是替代。
与'foreach'一起使用数组。 – Script47
查找'preg_replace' –
在** PHP **中有关于函数** str_ireplace **的问题,那么为什么不简单地查看一下手册? - > http://php.net/manual/en/function.str-ireplace.php < - 答案是 – Rizier123