Welcome Guest, Not a member yet? Register   Sign In
Code Igniter, how to do it the right way?
#4

[eluser]Dr.Dan[/eluser]
Hi Sector,

You are having a good point that is keeping the code in view as minimal as possible. In fact I think it is a good idea to keep code in view as low as possible. Referring to your first example you could have write it like this:

You could have write this in your controller
Code:
$data['links'] = array(
                    'main', 'files', 'scripts', 'forum', 'admin'
                );

and then you could access it in view by $links .

I also agree with optimal, that whenever you need to use the code in view, use it. And you should not be bother too much with that. Smile


Messages In This Thread
Code Igniter, how to do it the right way? - by El Forum - 06-27-2007, 02:15 AM
Code Igniter, how to do it the right way? - by El Forum - 06-27-2007, 05:38 AM
Code Igniter, how to do it the right way? - by El Forum - 06-27-2007, 05:51 AM
Code Igniter, how to do it the right way? - by El Forum - 06-28-2007, 01:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB