how to register an array with objects?

From: Date: Fri, 22 Jul 2005 08:56:34 +0000
Subject: how to register an array with objects?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-12824@lists.php.net to get a copy of this message
hi folkz, it is very easy to register a single object. but how can i register an array with objects? $myArray = array(); for ($i=0; $i<10; $i++) { $myArray[$i] = new My_Object(); } // $smarty->register_object("myArray", ...); ????? $smarty->assign('myArray', $myArray); TEMPLATE: {* here i want to use the My_Object-objects *} {foreach from=$myArray item=myObj} property: {$myObj->someProperty}<br> {/foreach} _________________________________________________________________________ Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179

« previous php.smarty.general (#12824) next »