php array_search具有多个命中的单个数组

我正在做一个日历,可能有超过1个事件与每天的日期相匹配.目前我很困惑如何发现比第一场比赛更多的array_search.这就是我现在正在做的事情.
if (array_search($date_today,$event_start) !== FALSE ) {
     $date_match = array_search($date_today,$event_start);
     $name       = $event_name[$date_match];    
   }

我可以使用’while’或’for each’语句推进array_search以查找多个匹配项吗?如果重要的是我的日期变量是日期,如1368680400.

Documentation for array_search告诉我们:

If needle is found in haystack more than once,the first matching key is returned. To return the keys for all matching values,use array_keys() with the optional search_value parameter instead.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...