alexandrheathen

Вывод контента на страницу PHP

Feb 1st, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php foreach ($newsList as $newsItem):?>
  2.                     <div class="post">
  3.                         <h2 class="title"><a href='/news/<?php echo $newsItem['id'] ;?>'><?php echo $newsItem['title'].' # '.$newsItem['id'];?></a></h2>
  4.                         <p class="meta">Posted by <a href="#"><?php echo $newsItem['author_name'];?></a> on <?php echo $newsItem['date'];?>
  5.                             &nbsp;&bull;&nbsp; <a href='/news/<?php echo $newsItem['id'] ;?>' class="permalink"> Full article</a></p>
  6.                         <div class="entry">
  7.                             <p><img src="/template/images/pic01.jpg" width="800" height="300" alt="" /></p>
  8.                             <p><?php echo $newsItem['short_content'];?></p>
  9.                         </div>
  10.                     </div>
  11.                 <?php endforeach;?>
Advertisement
Add Comment
Please, Sign In to add comment