For example, string:
I|You|He
How to replace with
Pig|Cat|Dog
$str = "I|You|He";
$replace_str = str_replace(array("I","You","He"),array("Pig","Cat","Dog"),$str);
print($replace_str);
php output:
"I|you|dog"
習慣沉默2017-05-16 13:11:26
How did the poster test it and under what environment? The code provided by the poster is the correct answer