[eluser]flokky[/eluser]
Hi community,
I'm playing the last week with CI and I like it so far.
At the moment I'm stuck and I'm not sure how to solve my problem. I want to be able to call a method within my controller from the index method. Is this possible? I'm using PHP 5
I'm getting an error: Syntax error, unexpected T_OBJECT_OPERATOR
Suppose you have a controller like this:
Code:
class MyClass extends Controller {
function MyClass()
{
parent::Controller();
$this->load->model('myModel', 'mymodel');
}
function index()
{
//do initialization here
this->call_method($param1, $param2); //GET THE ERROR HERE
$this->load->view('myfront_view', $data);
}
function call_method($param1, $param2)
{
//some other calls
}
}