阅读背景:

如何从PHP中的字符串中获取特定单词?

来源:互联网 

Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word. For example, I have a string that contains "lorem ipsum" and i want to replace the entire word that contains "lo" with "lorem can" so that the end result would be "lorem can ipsum" but if I put the string "loreal ipsum" through the same function, the result would now be "loreal can ipsum". ThanksSay you have a string, but you don't know what




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: