Advertisement
Guest User

Untitled

a guest
Nov 21st, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. function find($needle, $haystack) {
  2.   for($idx = 0; $idx < count($haystack); $idx++) {
  3.     if($needle == $haystack[$idx]) {
  4.       return $idx;
  5.     }
  6.   }
  7.   return null;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement