"hi", "hi" => "hello");echo"/> "hi", "hi" => "hello");echo">
Home > Backend Development > PHP Tutorial > 炒炒冷饭。该如何处理

炒炒冷饭。该如何处理

WBOY
Release: 2016-06-13 10:09:02
Original
867 people have browsed it

炒炒冷饭。
我上次看见有人用str_replace 替换是可以写成数组的,,给点资料,连接来看看吧



------解决方案--------------------
$trans = array("hello" => "hi", "hi" => "hello");
echo strtr("hi all, I said hello", $trans);


hello all, I said hi
 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template