[SMARTY] how to register an array with objects?
Martin Anders <[email protected]>
| Newsgroups | gmane.comp.php.smarty.general |
|---|---|
| Organization | http://freemail.web.de/ |
| Message-ID | <[email protected]> |
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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php