如何回显从中创建的数组的总数 型号
Function count {
$this->db->select('user_id, COUNT(user_id) as total);
$this->db->group_by('user_id');
$this->db->order_by('total', 'desc');
$query = $this->db->get('tablename', 10);
Return $query->result_array();}
控制器数据[总计] = $ this-> mymodel-> count();
Vardump将计数函数当前作为带
的数组Array = user_id => 1
Total. => 2 for examle
I.需要在视图中回显总数