ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  The Dynamic Duo of PEAR::DB and Smarty
Subject:   a cleaner looping syntax
Date:   2003-04-22 06:50:26
From:   anonymous2
FWIW for looping through arrays in Smarty templates I prefer this syntax, which is a bit more readable:

{foreach from=$widgets item=widget}
{$widget.name} : {$widget.price}


I enjoyed the tricks relating to bulk assignment of template variables.

1 to 1 of 1
1 to 1 of 1