[eluser]Dewos[/eluser]
Hi all.
For clean my Controller, i want to pass all $_GET vars from URI controller to view directly.
From:
Code:
function index($vars, $id, $name, $abracadaba)
{
$data['vars'] = $vars;
$data['id'] = $id;
$data['name'] = $name;
$data['abracadaba'] = $abracadaba;
$this->load->view('news/news_view', $data);
}
To something like this:
Code:
function index($vars, $id, $name, $abracadaba)
{
$this->load->vars($_GET); //for example
$this->load->view('news/news_view', $data);
}
In View
Code:
<html>
<?=$vars?>
<?=$id?>
<?=$name?>
<?=$abracadaba?>
</html>
Any ideas?
Ps. No, $this->input->get() is the same, i think. $this->uri->uri_string() maybe. But it loose the vars name, so it's a wrong way....