title: how to check PHP array's value without index offset error in 1 IF
body: <p>Is it possible to check the value of a certain key in a PHP array in 1 IF statement? Right now, in order to not throw an index offset error I have to check if the key is set, then check its value.</p>
  
  <pre><code>if (isset($array[$key]))
  {
      if ($array[$key] == $x)
      {
          // do stuff
      }
  }
  </code></pre>
  
  <p>(sorry, accidentally put ! in first IF originally)</p>