开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜