Chce wyswietlic w smarty zawartosc tablicy $result
W tablicy sa jakies elementy, przykladowo:
array(1) { ["result"]=> array(2) { [0]=> object(stdClass)#25 (8) { ["id"]=> string(1) "1" ["name"]=> string(7) "Moduły" ["description"]=> string(38) "Moduł dodania nowych funkcjonalności" ["number"]=> string(3) "000" ["file_start"]=> string(11) "modules.php" ["position"]=> string(1) "0" ["active"]=> string(1) "1" ["dateAdd"]=> string(19) "2017-08-19 17:08:10" } [1]=> object(stdClass)#26 (8) { ["id"]=> string(1) "9" ["name"]=> string(4) "Test" ["description"]=> string(7) "Testowy" ["number"]=> string(3) "001" ["file_start"]=> string(9) "index.php" ["position"]=> string(1) "0" ["active"]=> string(1) "1" ["dateAdd"]=> string(19) "2017-08-19 19:08:24" } } }
Lecz gdy probuje to wyswietlic to jest pusto i nie zwraca zadnego bledu. Jakies podpowiedzi?
<table>
<tr>
<th>ID</th>
</tr>
{foreach from=$result key=i item=row }
<tr>
<td>{$row.id}</td>
<td>{$row.number}</td>
</tr>
{/foreach}
</table>