Keys →
Functions ↓
function searchArray ( $needle, $haystack, $start=0, $last=-1 ) {#-k string search array#- look for the next occurance of the needle in a haystack#- start at record $start (default 0)#- end at record $last (default -1)#- return the key $i = 0; foreach ( $haystack as $k => $h ) { if (($last != -1) and ($i > $last)) return -1; if (($i >= $start) and (strpos(' '.$h, $needle))) return $k; $i++; } return -1; }?>