Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Wczytujemy ostatnie newsy
- $news = array();
- foreach($db->query('SELECT * FROM `news` ORDER BY `id` LIMIT 10', PDO::FETCH_ASSOC) as $row)
- {
- $news[] = array
- (
- 'tytul' => <a href="index.php?mod=news&act=show&id='$row['id']'">'.$row['tytul'].'</a>',
- 'tresc' => skroc($row['tresc']),
- 'data' => $row['data']
- );
- }
- // Przypisujemy newsy
- $tpl->assign('news', $news);
- // Parsujemy liste
- $tpl->parse('news_index.tpl');
Add Comment
Please, Sign In to add comment