[eluser]solid9[/eluser]
Hi guys
I have loaded in the __constructor a custom class that I have created.
Now, I want to call a particular method from that class.
Let say the class name is
Comments.
and it has a method called markup();
I tried calling the markup() method like this below, from the view.
Code:
foreach($comments as $c){
echo $c->markup();
}
<b>note:</b> The $comments has the same name with the Comments class.
and of course the $comments came from the controller.
the codes above works fine If I'm using PHP alone and not using CodeIgniter.
But it doesn't work when using CodeIgniter.
So what is the right codes to call a method in a custom class from the view?
Thanks in advanced.