load->model('menu_model', '', TRUE); $sqlApp = "SELECT * FROM tappname"; $resultaApp = $this->db->query($sqlApp)->result(); foreach($resultaApp as $therow) : $appName = $therow->app_name; $top_name = $therow->top_name; endforeach; ?> <?php echo $appName; ?>