title: checking if there's a certain key in an array php
body: <p>I want to be able to check if a certain key exists within my array. I have an array and I'm merging multiple arrays from mysql. What would be the best way to do so?</p>
  
  <p>for example</p>
  
  <pre><code>Array
  (
  [0] =&gt; Array
  (
   [id] =&gt; 3
   [comments] =&gt; comment text
  )
  [1] =&gt; Array
  (
   [id] =&gt; 3
   [comments] =&gt; comment text
  )
  [2] =&gt; Array
  (
   [idMenu] =&gt; 1
   [names] =&gt; text
  )
  [3] =&gt; Array
  (
   [idMenu] =&gt; 3
   [names] =&gt; names text
  )
  )
  </code></pre>
  
  <p>So I'm trying to see if this array has comments and/or names.</p>
  
  <p>do i have to do an if statement?</p>
  
  <p>Thanks</p>