php array_search single array with multiple hits -
i'm doing calendar possibly more 1 event matching date each day. i'm puzzled how discover more first match array_search. here i'm doing right now.
if (array_search($date_today, $event_start) !== false ) { $date_match = array_search($date_today, $event_start); $name = $event_name[$date_match]; }
can advance array_search 'while' or 'for each' statement find multiple matches? in case it's important date variables dates 1368680400.
documentation array_search tells us:
if needle found in haystack more once, first matching key returned. return keys matching values, use array_keys() optional search_value parameter instead.
Comments
Post a Comment