For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > July 2004 > RE: [SMARTY] Help understand Smarty - arrays, variables, general









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [SMARTY] Help understand Smarty - arrays, variables, general
Geoffrey Hoffman

2004-07-01, 4:02 pm

Assign the associative array to a smarty variable in one line of code then
use foreach
http://smarty.php.net/manual/en/lan...ion.foreach.php
or section
http://smarty.php.net/manual/en/lan...ion.section.php
in your .tpl.

You can make one .tpl for the layout/presentation of one record of info,
then include it inside a foreach, whether there's one record or multiple,
you've just made your stuff modularly reusable.

HTH-
Geoffrey

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com