how to access methods of controller from views |
[eluser]Amitabh Roy[/eluser]
Code: $comment_display = $this->comment_display($row->id); You are calling a method of your controller in your view. Its wrong. If you need to get the blogs and its associated comments you need to define the logic and pull the data in the controller itself , then arrange it and then pass it to the view. What you are doing in the view needs to be done in the controller. index Controller code Code: $blogEntries = array(); Also have a look at the tutorials specified in http://codeigniter.com/wiki/Category:Help::Tutorials These should help you in improving your codeigniter skills |
Messages In This Thread |
how to access methods of controller from views - by El Forum - 07-06-2011, 09:20 PM
how to access methods of controller from views - by El Forum - 07-07-2011, 01:51 AM
how to access methods of controller from views - by El Forum - 07-08-2011, 01:43 PM
|