Alright So I just installed both smarty and Pear and I am having a little trouble with something that I know I am going to use alot.
I am getting data from the db and trying to store it in an assoc array
while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC))
{
$smarty->assign('customerInfo',
array('id' => $row['ID'],
'name' => $row['Name'],
'address' => $row['Address'],
'town' => $row['City'],
'state' => $row['State'],
'zip' => $row['Zip']));
}
now When I go to access it in smarty all I get is the last record how do I loop through the data?
Would the data be stored as customerInfo[0][ID]?