String straTr (String Str, String from, String to) String StRTR (String Str, Array Replace_pairs) Finds the content in the STR, replacing the eligible FROM, or replaces where the key names in the array are replaced as keys Value content Phpecho straTr ('Hello World', 'Hello', 'Morning'); // Result IS "MORNING World";?> Php $ trans = array ("% s" => "jxyuhua" , "% D" => "2004"); Echo StRTR ("% s, i said% d", $ trans); // result is "jxyuhua, i said 2004";?>