So this is my foreach-loop
foreach($statusMessageResult as $row){
$row['username']=$db->getUsername($db->getUserNameById($row['posterID']));
$results[] = $row;
echo "Status from: " . $row['username'] . " ID: " . $row['statusID'] . "<br>" . $row['dateTime'];
}
Which works without problems. But now I want to have the same in smarty. So I thought I'm going to do this in the .php file
$smarty->assign('results', $results);
and this in the .html file
{foreach from=$results item=statusID}
id: {$statusID}<br>
{/foreach}
But it tells me
Notice: Array to string conversion in F:\xampp\htdocs\FinalYear\smarty\templates_c\ab89063f543bf0a8fe20c45b89aad63b616cd7c5.file.home.html.php on line 86
Array
Well the problem seems clear: I have an array and want to use it as a string, whiich isn't allowed. But how can I solve it ?