[eluser]TheFuzzy0ne[/eluser]
Personally, I would move the logic out of the view, and have it in the controller. The controller is the place to process the data received from the models, and perhaps catch any potential problems and take the appropriate action. The controller can create an array of objects that can be passed in to the view. In my humble opinion, a view should simply format your output, and the data should be fed in as variables.
Of course, this only applies if you are trying to stick to the MVC pattern, which means that you should keep your presentation layer separate from your data layer. Otherwise, you're encouraged to use CodeIgniter in whatever way makes your life easiest.
I hope this helps.