|
Posted by Martin Anders on 07/22/05 11:56
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
Navigation:
[Reply to this message]
|