title: echo if statement if key is present in array
body: <p>I want to create an if statement true if a key in an array is present but got nothing. Could someone of you help me. Sorry I'm not too good with php.
  Thank you.
  Here is the code.</p>
  
  <pre><code>$array = array('0' =&gt; ' Default Size ',
                 '1' =&gt; ' 2X Plus Size ',
                 '2' =&gt; ' 3X Plus Size ');
  
  foreach($array as $id=&gt;$text) {
    $sizes[] = array('id' =&gt; $id, 'text' =&gt; $text); }
  
  if(array_key_exists("0", $sizes)) {
      echo 'No Oversize Size';
  }
  </code></pre>