我是 php 的新手,也许以前有人问过这个问题,但我不知道具体要搜索什么,这就是问题所在
如果我有一个像这样的字符串
$adam = "this is a very long long string in here and has a lot of words";
我想在这个字符串中搜索单词“long”和单词“here”的第一次出现
然后选择它们之间的所有内容,并将其存储在一个新字符串中
所以结果应该是
$new_string = "long long string in here"
顺便说一句,我不知道字符串的长度和内容,我所知道的是它有“长”和“这里”这个词,我想要它们之间的词..