小编Mar*_*rko的帖子

用变量string替换所有子串实例

如果你有字符串

'Old string Old more string Old some more string'
Run Code Online (Sandbox Code Playgroud)

而且你想得到

'New1 string New2 more string New3 some more string'
Run Code Online (Sandbox Code Playgroud)

你会怎么做?

换句话说,您需要用变量字符串'New'替换'Old'的所有实例.$ i.有什么建议?

php string replace

6
推荐指数
1
解决办法
7216
查看次数

标签 统计

php ×1

replace ×1

string ×1