PHP:将字符串拆分为通配符周围的数组
我有一个字符串包含:
< a href="/wiki/Bob" title="Bob" >
它们之间有十个或更多我不需要的不相关数据。基本上,我希望将每个标题放在一个数组中,并且它们是不同的。我认为这很容易,但我不知道该怎么做。也许使用explode()和通配符,但显然你不能使用通配符?
非常感谢任何帮助。
编辑:我忘了提及,每周都会从“鲍勃”更改为“蒂姆”。
I have a string containing:
< a href="/wiki/Bob" title="Bob" >
There are ten and more unrelated data in bettween them that i don't need. Basically, I want the title for each one placed in an arrray and they're different. I thought this would be easy, but I can't find out how to do it. Perhaps using explode() and a wildcard, but apparently you can't use a wildcard?
Any help greatly appreciated.
EDIT:I forgot to mention that the will change every week form 'Bob' for example to 'Tim'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许是这样的?
输出:
Maybe something like this?
Output: