Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

loop into loop

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
pabro
Smarty n00b


Joined: 20 Jun 2003
Posts: 3

PostPosted: Fri Jun 20, 2003 3:13 pm    Post subject: loop into loop Reply with quote

hi, i need make a loop into a loop. example:

template.tpl ---------------
<talble>
<tr><td><b>{$submenu_title}</b></td></tr>
<tr><td><a href="{$link}">{$link_name}</a></td></tr>
<tr><td>&</td></tr>
</table>
------------------------------

this template must show:
submenu 1
link 1
link 2
link 3

submenu 2
link 1a
link 2a
link 3a

i know how to make a simple loop.
can i make a loop inside a loop?
Back to top
View user's profile Send private message Send e-mail
Justin
Smarty Regular


Joined: 07 May 2003
Posts: 38
Location: Vilnius, Lithuania

PostPosted: Sat Jun 21, 2003 6:04 am    Post subject: Reply with quote

oh yes you can

{foreach from=$array item=row}
{foreach from=$row item=col}
...
{/foreach}
{/foreach}

look at http://smarty.php.net/manual/en/language.function.foreach.php
_________________
http://www.baubas.net
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP