[eluser]Unknown[/eluser]
hello everybody
I have a big problem and I wish to help me: :down:
in a class posts there is this function
Code:
function view($id)
{
$this->load->model('posts_model');
$this->load->library('pagination');
$config['base_url'] = base_url()."index.php/posts/view/".$id."/";
$config['total_rows'] = $this->posts_model->get_num_rows($id);
$config['per_page'] = 3;
$config['num_links'] = 2;
$this->pagination->initialize($config);
$offset= $this->uri->segment(4) ;
$data['post'] = $this->posts_model->get_topic_by_id($id,$config['per_page'],$offset);
$this->load->view('posts_view',$data);
}
but pagination didn't worked at all
and I have to keep the base_url as written up
if you know any way please help me as soon as possible