fork(22) download
  1. <?php
  2.  
  3. $arrayOne = array(array('one' => 1), array('one' => 2), array('one' => 3));
  4. $arrayTwo = array(2, 4, 1);
  5.  
  6. $check = array();
  7. foreach ($arrayOne as $one) {
  8. $check[$one['one']] = true;
  9. }
  10. foreach ($arrayTwo as $two) {
  11. if (isset($check[$two])) {
  12. echo 'Match!';
  13. }
  14. }
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Match!Match!