There is a script output of the news but they all appear at once how to do something they would be displayed on the pages, such as what would be on each page were not more than 10 news.
Script output:
$page = $_GET['page']; if (!isset($page)) { $command = mysqli_query($connection, "SELECT * FROM `news` ORDER BY ID DESC"); require 'pages/news.php'; }
news.php:
Latest news<?php$empn = mysqli_num_rows($command);if ($empn == 0) {echo "<div class='empn'>News at the moment! Stay tuned."; } else { foreach ($command as $key => $itm): $valdesc = iconv_strlen($itm['desc']); $text = mb_substr($itm['desc'],0,1069, 'UTF-8'); $textt = $text . "..."; ?> <?php echo $itm['name']; ?><?php echo $itm['date']; ?><?php if ($valdesc > 1069) { echo $textt; } else { echo $text; } ?><?phpif ($valdesc > 1069) { ?> To open fully<?php}?><?phpendforeach;}?>