i show nothing to display?
code:
<?php
$query = "SELECT ente, scorea, scoreb, scorec, tiporicerca FROM entericerca";
$result = $tikilib->query($query);
$results = Array();
while ($voti = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
$results[] = $voti;
}
print_r($results); /* Array ( 0 => Array ( ente => POLITECNICO TORINO scorea => 3 scoreb => 6 scorec => 6 tiporicerca => RISULTATO DI VALORIZZAZIONE AP ) 1 => Array ( ente => TOR VERGATA scorea => 7 scoreb => 3 scorec => 9 tiporicerca => BREVETTO ) 2 => Array ( ente => POLITECNICO MILANO scorea => 6 scoreb => 9 scorec => 2 tiporicerca => PERFORMANCE MOSTRA ED ESPOSIZI ) 3 => Array ( ente => TOR VERGATA scorea => 2 scoreb => 5 scorec => 10 tiporicerca => CAPITOLO DI UN LIBRO ) ) */ CORRECT!!!!!
$smarty->assign('results', $results);
$instance->complete();
?>
template:
{*Smarty template*}
<html>
<body>
{section name=nr loop=$results}
{$resultsnr.ente} {$resultsnr.scorea} // 2 value random for test!
{/section}
</body>
</html>
I NOT SHOW NOTHING TO DISPLAY?
WHY?