Re: [SMARTY] Difference between section and foreach

From: Date: Fri, 21 Jun 2002 14:42:21 +0000
Subject: Re: [SMARTY] Difference between section and foreach
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4965@lists.php.net to get a copy of this message
I just started with smarty myself. For me, my favorite loop tool is foreach() in php, so I picked up foreach in smarty kinda easily. php: foreach($array as $key => $value) { echo "$key -> $value<br>"; } smarty: {foreach from=$array key=$key item=$value}
    {$key} -> {$value}<br>
{/foreach} So far, I haven't had the need to use {section} Sean Chambers wrote:
Hello, I am a little but confused over the syntax. I don't understand what the difference between {foreach} and {section} can someone please explain it a little better to me? Thank you. Sean Chambers Web Developer Vann Data Technology Centre Daytona Beach, FL (386) 238-1200 ext. 1205 chamberss@vanndata.com
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/

« previous php.smarty.general (#4965) next »