"hi", "hi" => "hello");echo"/> "hi", "hi" => "hello");echo">
Home >Backend Development >PHP Tutorial >炒炒冷饭。该如何处理
炒炒冷饭。
我上次看见有人用str_replace 替换是可以写成数组的,,给点资料,连接来看看吧
------解决方案--------------------
$trans = array("hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello", $trans);
hello all, I said hi