Re: Smarty template for parent-child form

From: Date: Tue, 24 Jul 2007 12:00:39 +0000
Subject: Re: Smarty template for parent-child form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-259417@lists.php.net to get a copy of this message
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

« previous php.general (#259417) next »