Where to use CodeIgniter HTML table?
I'm having a bit of difficulty understanding where this would go in CodeIgniter's application. I want to pull down some data from MySQL and display it in an HTML table.
I know how to define models and how to write views ...开发者_运维技巧 my only question is:
Should I create the HTML (call $this->table->generate();
) in my View or my Controller?
I would definitely generate the table in the view. $this->table->generate()
returns HTML so I would pass the database result to the view and work with it there with the rest of your HTML.
精彩评论