我通過foreach循環獲得了一些值。現在我想用一個字符串檢查每個值。找到並替換php中的字符串
我的字符串是"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
現在我想改變這一切的價值觀,與MY NEW PATH
更換http://www.example.com/TantraProjects/Ranjit/nt_plugin
。
我該如何使用php替換字符串?