It's obviously possible to have logic embedded in a View, but the idea on a MVC is to have all the logic in the Controller, so I guess you'll be defeating the purpose of using Codeigniter. The views in general are used to render content passed on by the controller.