我通过 foreach 循环获得了许多值。现在我想用一个字符串检查每个值。
我的字符串是"http://www.example.com/TantraProjects/Ranjit/nt_plugin"
我的值如下所示:
http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:http://www.example.com/TantraProjects/Ranjit/nt_plugin/
http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:http://www.example.com/TantraProjects/Ranjit/nt_plugin/
link:http://www.example.com/TantraProjects/Ranjit/nt_plugin/ - Google Blog Search
现在我想更改所有值,替换http://www.example.com/TantraProjects/Ranjit/nt_plugin
为MY NEW PATH
.
如何使用 php 替换字符串?