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

Popular posts from this blog

javascript - How do you prevent nested queries/catches in sequelize? -

java - Could not retrieve pre-bound Hibernate session - Could not obtain transaction-synchronized Session for current thread -

ruby on rails - ActiveRecord order not working -