Function without violating MVC

Dear all,

This is my first post I am new but I guess I got the MVC architecture. Please help me for the following

I need to create a small function which supports to render some links going to generate using iteration of array.

Where should I place this function, that means where should write the function, in controller or view without violating the MVC and how?

Thanks in advance



Assuming your view file is part of a model, where ‘model’=>$model is passed, you would call the function by


If the function is general purpose, I’d use helper.

Thank you

Thank you

Thank you