Table data presentation in template/view - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Table data presentation in template/view (/showthread.php?tid=3051) |
Table data presentation in template/view - El Forum - 09-06-2007 [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> Table data presentation in template/view - El Forum - 09-06-2007 [eluser]John_Betong[/eluser] Hi Monotoba, Is this what you mean: http://johns-jokes.com/main/debug Code: //================================================== Table data presentation in template/view - El Forum - 09-06-2007 [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 :-) |