title: Check for index key using an array in codeigniter PHP
body: <p>I'm using codeigniter framework for my project. And I have a multidimensional array generated as follow.</p>
  
  <pre><code>&lt;?php
       foreach ($tempResult-&gt;result() as $row) {
            $key[] = array( 
                       'date'=&gt;$today,
                       'reg_id'=&gt;$this-&gt;input-&gt;post("reg_id"),
                       'day'=&gt;$row-&gt;day
                     );
       }
  ?&gt;
  </code></pre>
  
  <p>This creates a data set as below.</p>
  
  <blockquote>
    <p>row 1 (2018/07/08,M1111,Monday)</p>
    
    <p>row 2 (2018/07/08,M1111,Tuesday)</p>
    
    <p>row 3 (2018/07/08,M1111,Thursday)</p>
  </blockquote>
  
  <p>Above php code "date,reg_id,day" is the composite key of the db table.
  I want to send the generated multi dimensional array to the db table and check if the key values are already exists.</p>
  
  <p>I understand that using <code>$this-&gt;db-&gt;where($array);</code> can send a one dimensional array and check if the index exists. But here I don't understand and need to do is check for existence of multiple data sets as the key.</p>