欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

PHP strtr()

程序员文章站 2022-03-08 21:32:40
...
strtr()
strtr(string,from,to)
strtr(string,array)
string1
from
to
array


<?php
echo strtr("Hilla Warld","ia","eo");
?>



Hello World



<?php
$arr = array("Hello" => "Hi", "world" => "earth");
echo strtr("Hello world",$arr);
?>



Hi earth


http://www.bkjia.com/PHPjc/319758.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319758.htmlTechArticle瀹氫箟鍜岀敤娉?strtr() 鍑芥暟杞崲瀛楃涓蹭腑鐗瑰畾鐨勫瓧绗︺€?璇硶 strtr(string,from,to)鎴栬€?strtr(string,array)鍙傛暟 鎻忚堪 string1 蹇呴渶銆傝瀹氳杞崲鐨勫瓧绗︿覆銆?..

相关标签: PHP strtr