title: PHP undefined offset notice
body: <p>I have the following if condition:</p>
  
  <pre><code>if ( 
      $items[ $count + 1 ]-&gt;menu_item_parent != $parent_id &amp;&amp; 
      $submenu &amp;&amp; 
      $items[ $count + 1 ]-&gt;menu_item_parent != $item-&gt;ID) {
  
      //something
  
  }
  </code></pre>
  
  <p>I get the notice:</p>
  
  <pre><code>Undefined offset: 13
  </code></pre>
  
  <p>So I assume the 13 does not exist in the <code>$items</code> array and it can be avoided by checking with <code>in_array</code>. However I'm unsure how I can use that function in the above condition.</p>