public function actionIndex() { $model = new UserReports(); $all_users = $model->getUsers(); $users = array(); foreach ($all_users as $us) { $users[$us['id']] = $us['first_name'] . ' ' . $us['last_name']; } $this->render('index', array('all_users' => $users)); }