<?php $str = "aaaabbbb"; $a = array('a','b'); $b = array('c','d'); echo str_replace($a,$b,$str); 运行结果:ccccdddd 相关文章: