public static function ArrayKeyExists($key, $search) {
    if (array_key_exists($key, $search)) {
      return $key;
    }
    if (!(is_string($key) && is_array($search))) {
      return false;
    }
    $key = strtolower($key);
    foreach ($search as $k => $v) {
      if (strtolower($k) == $key) {
        return $k;
      }
    }
    return false;
  }
public static function ArrayKeyExists($key, $search) {
    if (array_key_exists($key, $search)) {
      return $key;
    }
    if (!(is_string($key) && is_array($search))) {
      return false;
    }
    $key = strtolower($key);
    foreach ($search as $k => $v) {
      if (strtolower($k) == $key) {
        return $k;
      }
    }
    return false;
  }
public static function ArrayKeyExists ( $ key , $ search ) { if ( array_key_exists ( $ key , $ search ) ) { return $ key ; } if ( ! ( is_string ( $ key ) && is_array ( $ search ) ) ) { return false ; } $ key = strtolower ( $ key ) ; foreach ( $ search as $ k => $ v ) { if ( strtolower ( $ k ) == $ key ) { return $ k ; } } return false ; }
Case insensitive array_key_exists function, also returns
matching key.

@param String $key
@param Array $search
@return String Matching array key
Case insensitive array_key_exists function also returns matching key .