开发者

Where to use CodeIgniter HTML table?

开发者 https://www.devze.com 2023-04-06 23:57 出处:网络
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'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

精彩评论

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

关注公众号