0
I would like to pass two variables from Controller to Codeigniter view, follow code:
$lista_diversos['diversos'] = $this->diversos->getDiversos();
$listacodigos['codigos'] = $this->diversos->getCodigos();
$this->template->load('template', 'diversos/indexDiversos', $listacodigos, $lista_diversos);
the two are working, when I pass any of them as the first I can pick up the view, but the second I can’t recover in the view, what can I do?
vc only passes an argument that is an array with multiple keys.
– rray
can you give me an example?
– João Paulo
$dados['diversos'] = $this->diversos->getDiversos(); $dados['codigos'] = $this->diversos->getCodigos(); $this->template->load('template', 'diversos/indexDiversos', $dados);
– rray
worked out, thanks
– João Paulo