Nie wiem co jest nie tak pobieram dane z bazy ale treść itd. są w jednej linijce jak zrobić by każdy news był w nowej linii?
index.php
<?
require('db_connect.php');
require('./smart/Smarty.class.php');
$tpl = new Smarty;
$tpl -> template_dir = './templates/';
$tpl -> compile_dir = './templates_c/';
$Query='SELECT * FROM news';
{
$tablica[] = $a;
}
$tpl -> assign('news', $tablica);
$tpl -> display('lcms/index.tpl');
?>
index.tpl
<td>{section name=a loop=$news} {$news[a].name} {/section}
</td> <td>{section name=a loop=$news} {$news[a].txt} {/section}
</td> <td>{section name=a loop=$news} {$news[a].data} {/section}
</td> <td>{section name=a loop=$news} {$news[a].autor} {/section}
</td>