$forum_list->result() returns an array of results.
If you only need 1 line, use $forum_list->row(), otherwise in javascript you will need to skip all lines.
$.each(data, function(i,v){
alert(v.overskrift);
});
EDIT: When outputting JSON, do not print anything before or after. You need to delete $this->load->view('includes/footer', $data);after json_encode. In addition, the controllers do not return anything.
EDIT 2: Replace if ($data['forum_list'] === true)with if ($data['forum_list'] !== false). ===compares the type, and the array is not logical.
source
share