Man-wai Chang wrote:
> Is there a template that presents a parent-child
> forms, for example, an invoice object which has a header(invoice no,
> date, customer code, invoice total) and multiple items (item no, item
> name, quantity, price, amount)?
>   
Go to http://smarty.php.net/manual/en/language.function.foreach.php

What you do is assign the items to an array called, say, items. Then you
use "foreach" in the template to iterate the array, just like you would
in PHP itself. Example 7-8 (Contacts) is pretty close to what you're doing.

Regards,
Chad

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to