[eluser]Unknown[/eluser]
Hi all
I would like to know how can we call a function from another controller.
e.g.
first controller main.php
class Main extends CI_Controller {
function xyz()
{
echo 'hii';
}
}
second controller sec_main.php
class Sec_main extends CI_Controller {
function abc()
{
**//here i would like to call xyz
}
}
**
I did like
$obj=new main;
$obj->xyz;
but it is giving fatal error.
please help me out.
Thanks in advance