[eluser]PHPraja[/eluser]
i have the below code in my constructor of a class in a controller
Code:
$data['mystuffPlaces']=$this->place_model->get_places_mystuff();
and in another function of the same class i have
Code:
$layout['page_title'] = $this->lang->line('My_places');
$layout['body']=$this->load->view('place/user_all_places',$data, True);
$this->load->view('Layout', $layout);
To my surprise i found $data['mystuffPlaces'] is not passed to the layout view.
if i remove it in the constructor and place it in the same function it works!!
or if i replace $data with $this->data, even then though it is in constructor it works!! can any one plz explain me the difference..
Thanks in advance.