You can use $this->db->insert(); to insert data in your database in Codeigniter.

BY Best Interview Question ON 06 Oct 2019

Example

If you want to insert this in your "Admin Table".

$dataArray = array(
       'name'=>'bestinterviewquestion.com',
       'phone'=>'9971083635',
       'email'=>'[email protected]'
);

$this->db->insert('Admin',$dataArray);

// Here "Admin" is My TableName

Suggest An Answer