title: Working with two arrays where one array's values match the other array's keys
body: <p>I saw another question on a similar matter but my issue appears to be distinct.  </p>
  
  <p>I have two arrays:</p>
  
  <p>Array #1:</p>
  
  <pre><code>Array
  (
      [1] =&gt; Baby/Juvenile
      [2] =&gt; Bedding
      [3] =&gt; Room Decor
      [4] =&gt; Bath &amp; Potty
      [5] =&gt; Feeding
      [7] =&gt; Furniture
      [8] =&gt; Bath
      [9] =&gt; Towels
      [10] =&gt; Shower Curtains
  )
  </code></pre>
  
  <p>Array #2</p>
  
  <pre><code>Array
  (
      [1] =&gt; 5
      [2] =&gt; 7
      [3] =&gt; 9
  )
  </code></pre>
  
  <p>I would like to compare these arrays and pull the key/value pairs from the first array based on the values in the second array. My desired output is: </p>
  
  <pre><code>   Array
  (
      [5] =&gt; Feeding
      [7] =&gt; Furniture
      [9] =&gt; Towels
  )
  </code></pre>
  
  <p>I played around with various array functions but can't seem to figure this out, any tips would be much appreciated, thanks!</p>