我有一个类似这种格式的关键字
sample text
我也有一个这样的数组,格式如下
Array
(
[0] => Canon sample printing text
[1] => Captain text
[2] => Canon EOS Kiss X4 (550D / Rebel T2i) + Double Zoom Lens Kit
[3] => Fresh sample Roasted Seaweed
[4] => Fresh sample text Seaweed
)
我想sample text
在这个数组中找到关键字。我的预期结果
Array
(
[0] => Canon sample printing text //Sample and Text is here
[1] => Captain text //Text is here
[3] => Fresh sample Roasted Seaweed //Sample is here
[4] => Fresh sample text Seaweed //Sample text is here
)
我已经在尝试strpos
但没有得到正确的答案
请指教