Welcome Guest, Not a member yet? Register   Sign In
Getting variable's value in another view that is getting called in parent view
#1

[eluser]Computerzworld[/eluser]
Hello,
I am having one parent view which contains two child views. So the scenario is that my parent view is getting called from my controller function like this

Code:
function abc()
{
        $this->load->view('parentView');
}

And parentView is having two another child views that are,

Code:
$this->load->view('child1');
$this->load->view('child2');

And in child1 view there are several variables that I want to use in child2. Can I get it the value of variable like this? Please help me. Thank you.
#2

[eluser]InsiteFX[/eluser]
Code:
// $data will be an array of your view values...
$this->load->vars($data);
$this->load->view('parentView');

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB