本文共 187 字,大约阅读时间需要 1 分钟。
把字符串的不同字符替换为对应字符
echo str_replace(['a','b'], ['c','d'], "aabbccdd");
ccddccdd
echo str_replace(['a','b'], ['c'], "aabbccdd");
ccccdd
echo str_replace(['a','b'], 'c', "aabbccdd");
ccccccdd
转载地址:http://ykyws.baihongyu.com/