i'm newbie codeigniter programmer.
i want to use function and all variable from this function to another function in same class controller. this my code
function page()
{   
    $page_id = $this->uri->segment(3);
    $page_details = $this->m_module->submenu($page_id)->row_array();
    $data['title']= $page_details['sub_title'];
    $data['menu'] = $page_details['title'];
    $data['submenu'] = $page_details['sub_title'];
    $data['link'] = $page_details['sub_target'];
    $data['page_id'] = $page_id;
}
function employee()
    {
        $data['employee']= $this->m_module->employee()->result_array();
        $this->page();      
        $this->template->display($data['link'],$data);
    }
the problem is variable function page() can't call in function employee().
this i get at browser
A PHP Error was encountered
Severity: Notice
Message: Undefined index: link
Filename: controllers/Module.php
Line Number: 39
please help.
Thank you
 
     
     
    