I currently have a model that creates an array and returns it using the following:
$data = array(
'title' => $this->input->post('title'),
'slug' => $slug,
'text' => $this->input->post('text')
);
$this->db->insert('table-name', $data);
$id = $this->db->insert_id();
return $data;
Unfortunately the variable $data is empty when I get it back in my controller. How do I go about getting hold of this data to pass to my view.
The code seems fine.
Controller:
View