Echo total in array codeigniter -
how echo total out of array created model
function count { $this->db->select('user_id, count(user_id) total); $this->db->group_by('user_id'); $this->db->order_by('total', 'desc'); $query = $this->db->get('tablename', 10); return $query->result_array();}
controller data [total] = $this->mymodel->count();
vardump count function current arrays
array = user_id => 1 total. => 2 examle
i.need echo total in view
Comments
Post a Comment