字串批量替换
2021-08-03 本文已影响0人
三米板
<?php
$find = array('a','b');
$replace = array('A','B');
$string = 'abcdefg';
$top = str_replace($find,$replace,$string);
echo $top;
结果:
ABcdefg
<?php
$find = array('a','b');
$replace = array('A','B');
$string = 'abcdefg';
$top = str_replace($find,$replace,$string);
echo $top;
结果:
ABcdefg