<?php {foreach from=$news item=item} {$item} {/foreach} ?>
Problem jest taki że pokazuje ostatni rekord w bazie zamiast wszystkie

<?php require_once ('_mysql.php'); require_once ('./lib/Smarty/Smarty.class.php'); require_once ('_function.php'); $smarty = new Smarty; FROM wpp_news"); $smarty -> assign('results', $db->getAssoc($row)); $smarty -> display('news.tpl'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="Description" content="Witam na mojej stronie"> <meta name="Keywords" content="programowanie"> <meta name="Author" content="gOdi"> <link rel="Stylesheet" type="text/css" href="style.css"> </head> {foreach key=cid item=con from=$results} {$con.news} {foreachelse} Brak newsów {/foreach}
<?php { $rows[] = $r; } $smarty -> assign('results', $rows); $smarty -> display('news.tpl'); ?>
<?php require_once ('_mysql.php'); require_once ('./lib/Smarty/Smarty.class.php'); require_once ('_function.php'); $smarty = new Smarty; FROM wpp_news"); $smarty -> assign('news', $res); $smarty -> display('news.tpl'); ?>
<?php { $rows[] = $r; } $smarty -> assign('results', $rows); $smarty -> display('news.tpl'); ?>