title: "Batch Insert" inserts null value in database
body: <p>I dont know why after clicking the "Add Button", the items that needs to insert into the database is NULL.</p>
  
  <p>so here's my controller</p>
  
  <pre><code>public function addItem(){
    $data = array(
     "item_ID"=&gt;$_POST['item_ID'],
     "itemName"=&gt;$_POST['itemName'],
     "itemDescription"=&gt;$_POST['itemDescription'],
     "itemLink"=&gt;$_POST['itemLink']
    );
    $orgID = $this-&gt;model-&gt;get_org();
    $this-&gt;model-&gt;insertItem($data,$orgID);
  }
  </code></pre>
  
  <p>and here's my model</p>
  
  <pre><code>public function insertItem($data,$orgID){
    $this-&gt;db-&gt;insert('Items',$data);
    $getID=$this-&gt;db-&gt;insert_id();
    foreach($orgID as $temp):
      $Organization_ID = $_POST[$temp-&gt;OrganizationID];
    endforeach;
    $SkillReq=$this-&gt;input-&gt;post('0');
    $Skill_ReqID=$this-&gt;input-&gt;post();
  
    $insertdata = array();
    for($i=0; $i=count($orgID); $i++){
      $insertdata[]=array(
         'Skill_ReqID'=&gt;$Skill_ReqID[$i],
         'OrganizationID'=&gt;$Organization_ID[$i],
         'item_ID'=&gt;$getID[$i],
         'SkillReq'=&gt;$SkillReq[$i]
        );
       }
    $this-&gt;db-&gt;insert_batch('skillreqdept',$insertdata);
   }
  </code></pre>
  
  <p>it actually inserts the rows that had been counted in orgID but there is no data, only the Auto Incremented skill_reqID has in it.</p>