title: how to check if values inside array is present codeigniter
body: <p>hi how can i check the values of an array if it is present? for example i have this table</p>
  
  <pre><code>------------------
  id | Key | group |
  ------------------
  1  | abc |   1   |
  ------------------
  2  | def |   1   |
  ------------------
  3  | abc |   2   |
  ------------------
  </code></pre>
  
  <p>so as you can see value 2 doesnt have the def key. if i query</p>
  
  <pre><code>SELECT * FROM THISTABLE WHERE GROUP = 2.
  </code></pre>
  
  <p>it will give array(id = > 1 key => abc group = 2)</p>
  
  <p>how will i check the value of the array for instance</p>
  
  <pre><code>if(this array have the key abc){
  
  execute this code}
  
  if(this array have the key def){
  
  execute this code}
  </code></pre>