|
function content(){
$this->load->model('minfo');
$data['content'] = $this->minfo->get_content();
$this->load->view('detil',$data);
}
function get_content($id){
$query = $this->db->get_where('news',array('id'=>'$id'));
return $query->result();
}
<?php foreach ($content as $res):?>
<li><a href=""><?php echo $res->title?></a></li>
<?php endforeach;?>
a href 后面应该怎么写? |
|