Table data presentation in template/view |
[eluser]Monotoba[/eluser]
Hello, I'm brand new to code igniter and I am wondering if someone here can provide a demo of using nested loops for data presentation using the template system in ci. Here's a template to show you what I mean. How would I get the template engine to display data in a multidementional array containing multiple color rows containing multiple color cells? Thanks for the help <html> <head> <title>Color Table Demo</table> </head> <body> <table> {color_row} <tr> {color_cell} <td width="15" bgcolor="#{color}"> <font color="#{font_color}> {color} </font> </td> {/color_cell} </tr> {/color_row} </table> </body> </html>
[eluser]John_Betong[/eluser]
Hi Monotoba, Is this what you mean: http://johns-jokes.com/main/debug Code: //==================================================
[eluser]Monotoba[/eluser]
Hi John, This is not quite what I was looking for however, I figured it out. What I wanted was a method to pass arrays of arrays, of arrays of values and have the template parser process them in a loops. My issue turned out to be that I was resetting one of the arrays of an array of values in the wrong place. Thus erasing a whole sector of my values. Thanks for the help though :-) |
Welcome Guest, Not a member yet? Register Sign In |