{* Smarty foreach/sample4-1.tpl *} <html> <head> <title>Smarty Test</title> </head> <body> <h1>{$title}</h1> {foreach from=$personaldata item=var name=loopname} <p>({$smarty.foreach.loopname.iteration}) {$var}</p> {/foreach} </body> </html>