How much code should be in a CodeIgniter view?

后端 未结 7 1839
长发绾君心
长发绾君心 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' => '<div class="item">', 'item_suffix' => '</div>'...)
    echo get_items();
    
    0 讨论(0)
提交回复
热议问题