php中的字符串替换函数有哪些?
如果字符串中没有中文可以使用str_replace()函数替换字符串。
语法格式:
str_replace(find,replace,string,count)
参数介绍:
实例:
把字符串 "Hello world!" 中的字符 "world" 替换为 "Shanghai"
echo str_replace("world","Shanghai","Hello world!");
以上就是php中的字符串替换函数是什么的详细内容,更多请关注亿速云其它相关文章!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。