php中的字符串替换函数是什么-PHP问题

资源魔 35 0

假如字符串中不中文能够应用str_replace()函数交换字符串。

语法格局:

str_replace(find,replace,string,count)

参数引见:

bcdce2ebef5e19294a1b1cfed390595.png

实例:

把字符串 "Hello world!" 中的字符 "world" 交换为 "Shanghai"

echo str_replace("world","Shanghai","Hello world!");

更多相干教程请拜访资源魔。

以上就是php中的字符串交换函数是甚么的具体内容,更多请存眷资源魔其它相干文章!

标签: php php教程 字符串 php故障解决 php使用问题

抱歉,评论功能暂时关闭!