title: How can I check if an array contains a specific key in php
body: <p>I know how to check for a value in an array, but how do I check for a value in an Array Iterator?</p>
  
  <pre><code>$array = new ArrayIterator(array(
  '1QmRjtsw2UQ' =&gt; array('pubdate' =&gt; '26 Jun 15', 'alt' =&gt; '8 Year Old Beautifully Covers Thinking Out Loud', 'anchor text' =&gt; '8-yo \'Thinking Out Loud\''),
  'eKqLaYrcf3A' =&gt; array('pubdate' =&gt; '25 Jun 15', 'alt' =&gt; 'Plane Lands On Truck', 'anchor text' =&gt; 'Plane Lands On Truck'),
  ));
  </code></pre>
  
  <p>I'm trying to check for the values such as <code>1QmRjtsw2UQ</code>.</p>
  
  <p>This does not work:</p>
  
  <pre><code>if(in_array('1QmRjtsw2UQ', $array));
  </code></pre>