title: Compare 2 arrays to match 2 keys
body: <p>Need to match 2 keys in 2 multidimensional arrays and return matches from the first array if found.</p>
  
  <pre><code>array1 =&gt;
  
  $arr[1] = array('fruit' =&gt; 'apple', 'ver' =&gt; '1', 'color' =&gt; 'blue', 'name' =&gt;'joe');
  $arr[2] = array('fruit' =&gt; 'peach', 'ver' =&gt; '2', 'color' =&gt; 'red', 'name' =&gt;'jane');
  $arr[3] = array('fruit' =&gt; 'apple', 'ver' =&gt; '1', 'color' =&gt; 'red', 'name' =&gt;'jack');
  $arr[4] = array('fruit' =&gt; 'apple', 'ver' =&gt; '4', 'color' =&gt; 'grey', 'name' =&gt;'joe');
  
  
  
  array2 =&gt;
  
  $arr[1] = array('fruit' =&gt; 'apple', 'ver' =&gt; '4', 'color' =&gt; 'red', 'name' =&gt;'joe');
  $arr[2] = array('fruit' =&gt; 'apple', 'ver' =&gt; '4', 'color' =&gt; 'red', 'name' =&gt;'jane');
  </code></pre>
  
  <p>I need to match 2 key values, in this example only return the matches in array1 that match array2. The key values for example are the keys
  <code>fruit</code> and <code>name</code>.</p>
  
  <p>In the above example you can see this match should only return <code>$arr1</code> and <code>$arr4</code> for <code>array1</code> since they match <code>$arr[1]</code> in <code>array2</code>. I need to return the matches only for array1.</p>
  
  <p>This is an example, the real case I do not know the array varibale indicator or the amount ( likely a few hundred in each).</p>