title: Compare multidimensional array with simple array
body: <p>I have two arrays I want to compare these two arrays and find the match. If 807 and 200 appears in same keys like 131 then create third array </p>
  
  <pre><code>array(131=&gt;(807,200));
  </code></pre>
  
  <p>array1:-</p>
  
  <pre><code>Array([0] =&gt; 807,[1] =&gt; 200)
  </code></pre>
  
  <p>array2 :-</p>
  
  <pre><code>$mat= Array([0] =&gt; Array([131] =&gt; 807),[1] =&gt; Array([132] =&gt; 807),[2] =&gt; Array([125] =&gt; 200),[3] =&gt; Array([131] =&gt; 200)) 
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>&lt;?php
  $filtered = array();
  array_walk_recursive($matchingskusarr, function($val, $key) use(&amp;$filtered) {
      if ($key === 131) {
          echo "The key $key has the value $val&lt;br&gt;";
          $filtered[$val] = $key;
      }
  });
  
  echo "&lt;pre&gt;";
  print_r($filtered);
  echo "&lt;/pre&gt;";
  ?&gt;
  </code></pre>