daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // Wczytujemy ostatnie newsy
  3. $news = array();
  4.  
  5. foreach($db->query('SELECT * FROM `news` ORDER BY `id` LIMIT 10', PDO::FETCH_ASSOC) as $row)
  6. {
  7.     $news[] = array
  8.     (
  9.         'tytul' => <a href="index.php?mod=news&act=show&id='$row['id']'">'.$row['tytul'].'</a>',
  10.         'tresc' => skroc($row['tresc']),
  11.         'data' => $row['data']
  12.     );
  13. }
  14.  
  15. // Przypisujemy newsy
  16. $tpl->assign('news', $news);
  17.  
  18. // Parsujemy liste
  19. $tpl->parse('news_index.tpl');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top