1
I need to pass the variable $limit to my view and display it there, how could I do it?
public function index() {
// ....
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
$limit = $config['per_page'];
$offset = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$where = "id IS NOT NULL";
$servidores = $this->server->listarServidores($this->select, $where, $limit, $offset);
$data['servidores'] = $servidores;
$this->template->load('template_view', 'home/home_view', $data);
}
The data in the variable
$data
are no longer passed to the view? If yes, simply add the value of$limit
in$data
.– Woss
Yes, I thought the $data array was just for passing bank results, it worked, thank you!
– viniciussvl
I put the solution in response form, so I can flag the topic as solved.
– Woss