title: Check if associative array contains value, and retrieve key / position in array
body: <p>I'm struggling to explain what I want to do here so apologies if I confuse you.. <em>I'm just as confused myself</em></p>
  
  <p>I have an array like so:</p>
  
  <pre><code>$foo = array(
      array('value' =&gt; 5680, 'text' =&gt; 'Red'), 
      array('value' =&gt; 7899, 'text' =&gt; 'Green'), 
      array('value' =&gt; 9968, 'text' =&gt; 'Blue'), 
      array('value' =&gt; 4038, 'text' =&gt; 'Yellow'),
  )
  </code></pre>
  
  <p>I want to check if the array contains the value e.g. 7899 and also get the text linked to that value "Green" in the example above.</p>