title: Cakephp check to see if two values are in array
body: <p>I need to only allow members to write a review on a accommodation if they have stayed at the accommodation and there member_id matches the Auth->user('id').</p>
  
  <p>On the accommodation/view I pass the BookingRequests data.</p>
  
  <p>which looks like this</p>
  
  <pre><code>BookingRequest
    0
      member_id =&gt; 4
      accepted =&gt; 1
    1
      member_id =&gt; 5
      accepted =&gt; 0
    2
      member_id =&gt; 4
      accepted =&gt; 0
  </code></pre>
  
  <p>How would I search the array so I can allow only people who have stayed to add a review?</p>