How to retrieve data from the database and display it in a html table using Codeigniter

前端 未结 3 588
余生分开走
余生分开走 2021-01-16 04:47

anyone please help me to retrieve the db data and how to view it in html table.is the coding i given is correct or not if not can you please say how i have to give. in order

3条回答
  •  鱼传尺愫
    2021-01-16 05:28

    Try this:

    load->model('editcontent_model');
            $this->load->helper('url');
            $this->load->library('acl');
            $data['result'] = $this->editcontent_model->get_contents();
            $this->load->view('edit_content/edit_content', $data);
        }
    }
    ?>
     
    content; ?>
    
        
    Content
    db->select('content'); $this->db->from('contents'); $query = $this->db->get(); return $result = $query->result(); } }

提交回复
热议问题