|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
sunzi Smarty n00b
Joined: 09 May 2006 Posts: 3
|
Posted: Wed May 10, 2006 7:20 am Post subject: Cannot use object of type stdClass as array |
|
|
Hello There,
sorry, but I´m a newbie with smarty.
I get this erroe message:
Cannot use object of type stdClass as array
the php-script
-->
if($count == 1)
{
$invs = $db->get_results("select * from inventory");
$smarty->assign('inventory', $invs);
$smarty->display('inv.tpl');
}
else
{
<--
the template
{foreach item=inven from=$inventory}
{$inven.id} {$inven.vorname} {$inven.name} {$inven.team} {$inven.role} {$inven.computerType} {$inven.model} {$inven.hardwareDetails} {$inven.serviceTag} {$inven.deliveryDate} {$inven.screen} {$inven.licenseSoftware}<br>
{/foreach}
The array is filled fine, I print_r in php, but when I use the template i get
the error message.
Please help.
Thanks
Sun |
|
Back to top |
|
andreas Smarty Pro
Joined: 22 Apr 2003 Posts: 106
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|