title: Check if a key exists and get a corresponding value from an array in PHP
body: <p>Any idea how to check if a key exists and if yes, then get the value of this key from an array in php.</p>
  
  <p>E.g.</p>
  
  <p>I have this array:</p>
  
  <pre><code>$things = array(
    'AA' =&gt; 'American history',
    'AB' =&gt; 'American cooking'
  );
  
  $key_to_check = 'AB';
  </code></pre>
  
  <p>Now, I need to check if <strong>$key_to_check</strong> exists and if it does, get a coresponding value which in this case will be <strong>American cooking</strong></p>