开发者

PHP Case-insensitive equivalent of strtr

开发者 https://www.devze.com 2023-04-08 11:00 出处:网络
Where I could find a case-insensitive version of strtr? 开发者_开发问答 strtr is overloaded, I am talking about the following one

Where I could find a case-insensitive version of strtr?

开发者_开发问答

strtr is overloaded, I am talking about the following one

string strtr ( string $str , array $replace_pairs )


Use str_ireplace:

str_ireplace(array_keys($replace_pairs), array_values($replace_pairs), $str);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号