src/bbn/x.php
public static function find(array $ar, array $where){
    //die(var_dump($where));
    if ( !empty($where) ){
      foreach ( $ar as $i => $v ){
        $ok = 1;
        foreach ( $where as $k => $w ){
          if ( !isset($v[$k]) || ($v[$k] !== $w) ){
            $ok = false;
            break;
          }
        }
        if ( $ok ){
          return $i;
        }
      }
    }
    return false;
  }
public static function find(array $ar, array $where){
    //die(var_dump($where));
    if ( !empty($where) ){
      foreach ( $ar as $i => $v ){
        $ok = 1;
        foreach ( $where as $k => $w ){
          if ( !isset($v[$k]) || ($v[$k] !== $w) ){
            $ok = false;
            break;
          }
        }
        if ( $ok ){
          return $i;
        }
      }
    }
    return false;
  }
public static function find ( array $ ar , array $ where ) { //die(var_dump($where)); if ( ! empty ( $ where ) ) { foreach ( $ ar as $ i => $ v ) { $ ok = 1 ; foreach ( $ where as $ k => $ w ) { if ( ! isset ( $ v [ $ k ] ) || ( $ v [ $ k ] !== $ w ) ) { $ ok = false ; break ; } } if ( $ ok ) { return $ i ; } } } return false ; }
Returns the array's first index, which satisfies the 'where' condition.

```php
\bbn\x::hdump(\bbn\x::find([[
'id' => 1,
'name' => 'Andrew',
'fname' => 'Williams'
], [
'id' => 2,
'name' => 'Albert',
'fname' => 'Taylor'
], [
'id' => 3,
'name' => 'Mike',
'fname' => 'Smith'
], [
'id' => 4,
'name' => 'John',
'fname' => 'White'
]], ['id' => 4]));
// int 3
\bbn\x::hdump(\bbn\x::find([[
'id' => 1,
'name' => 'Andrew',
'fname' => 'Williams'
], [
'id' => 2,
'name' => 'Albert',
'fname' => 'Taylor'
], [
'id' => 3,
'name' => 'Mike',
'fname' => 'Smith'
], [
'id' => 4,
'name' => 'John',
'fname' => 'White'
]], ['name' => 'Albert', 'fname' => 'Taylor']));
// int 1
```

@param array $ar The search within the array
@param array $where The where condition
@return bool|int
Returns the array s first index which satisfies the where condition .