How much code should be in a CodeIgniter view?

后端 未结 7 1837
长发绾君心
长发绾君心 2020-12-29 13:44

First steps are done, some pages are coded. And after looking to the result I\'ve got the question... how much code is there should be in templates (View)?

For examp

7条回答
  •  情话喂你
    2020-12-29 14:30

    I think as James, too much code, but you can add an array variable to the get_items() function, to control the prefix and suffix of each item, something like:

    $options = Array('item_prefix' => '
    ', 'item_suffix' => '
    '...) echo get_items();

提交回复
热议问题