CodeIgniter Forums
how to use 2 loops in 1 template .. - 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: how to use 2 loops in 1 template .. (/showthread.php?tid=53356)



how to use 2 loops in 1 template .. - El Forum - 07-20-2012

[eluser]Mr.SoOoMa[/eluser]
Hello there ,

i'm working on a cars php script ..

there are 2 tables .. types table and models table ..

each type has more than one model, my problem is how to show every type and its models under it ..

i think i have to use a loop to show types and loop to show each type's models .. but how can i do this ?

thanks a lot


how to use 2 loops in 1 template .. - El Forum - 07-20-2012

[eluser]Mr.SoOoMa[/eluser]
BTW .. i'm using smarty template engine .. so i use (foreach) in my templates ..