original_string: public function multidimensionalSearch($parents, $searched)
      {
          if (empty($searched) || empty($parents)) {
              return false;
          }
  
          foreach ($parents as $key => $value) {
              $exists = true;
              foreach ($searched as $skey => $svalue) {
                  $exists = $exists && isset($parents[$key][$skey]) && $parents[$key][$skey] === $svalue;
              }
  
              if ($exists) {
                  return true;
              }
          }
  
          return false;
      }
code: public function multidimensionalSearch($parents, $searched)
      {
          if (empty($searched) || empty($parents)) {
              return false;
          }
  
          foreach ($parents as $key => $value) {
              $exists = true;
              foreach ($searched as $skey => $svalue) {
                  $exists = $exists && isset($parents[$key][$skey]) && $parents[$key][$skey] === $svalue;
              }
  
              if ($exists) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function multidimensionalSearch ( $ parents , $ searched ) { if ( empty ( $ searched ) || empty ( $ parents ) ) { return false ; } foreach ( $ parents as $ key => $ value ) { $ exists = true ; foreach ( $ searched as $ skey => $ svalue ) { $ exists = $ exists && isset ( $ parents [ $ key ] [ $ skey ] ) && $ parents [ $ key ] [ $ skey ] === $ svalue ; } if ( $ exists ) { return true ; } } return false ; }
docstring: Search for a data in a multidimensional array.
  
  Example:
  $parents = array();
  $parents[] = array('date'=>1320883200, 'uid'=>3);
  $parents[] = array('date'=>1320883200, 'uid'=>5);
  $parents[] = array('date'=>1318204800, 'uid'=>5);
  echo multidimensionalSearch($parents, array('date'=>1320883200, 'uid'=>5)); // true
  
  @param array  $parents
  @param string $searched
  
  @return mixed
docstring_tokens: Search for a data in a multidimensional array .