Re: Smarty template for parent-child form

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux