I need to save in the database category, for example, βa and bβ, but to save the model in the database just βaβ, skip the empty space and &.
This is an array:
$data = array('avenvu' => $_POST['avenvu'], 'brand' => $_POST['brand'], 'category' => $_POST['category'], 'description' => $_POST['description'], 'man_women_shop'=> $_POST['man_women_shop'], 'postdatetime' => date("Ymd H:i:s",time()), 'publish' => 1, 'user_id' => $this->session->userdata('user_id')); $result = $this->personal_closest->insertCloset($data);
And this is the model:
function insertCloset($data) { $this->db->insert('personal_closest',$data); }
source share