【发布时间】:2012-07-23 12:17:35
【问题描述】:
我想查找数组中多个值中的任何一个的第一次出现。
$sentence = array(I, want, to, go, to, the, market);
if(in_array(array('swim','fly','go'), $sentence)) {
// Should return KEY = 3 as 'go' was found in the third key of the array
}
我确定这一定是相当普遍的,怎么做?
【问题讨论】: