首页 新闻 会员 周边

不使用正则及str_replace,php如何实现字符串替换?

0
[待解决问题]

应该就是php如何编写一个类似str_replace函数的功能

勇往直泉的主页 勇往直泉 | 菜鸟二级 | 园豆:202
提问于:2017-07-26 22:56
< >
分享
所有回答(1)
0

$str1 = 'string1';

$str2 = 'string2';

$temple = $str1;

$str1 = $str2;

$str2 = $temple;

不知道这样能不能符合你的要求,或者你自己写一个类似str_replace函数功能的函数

寞小陌 | 园豆:104 (初学一级) | 2017-07-27 09:46
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册