Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($num != 0 && !empty($search_query)) {
- while ($row = mysqli_fetch_array($query)) { ?>
- <div class="sidebar2">
- <h1><a href="<?php echo base_url . '/metodrecommendations/teacher?articles&id='.$row['id']; ?>"><?php echo $row['title']."<br/>"; ?></a></h1>
- <p><?php $text = $row['text'];
- $counttext = 1000;
- $text = substr($text, 0, $counttext);
- $text = rtrim($text);
- $text = substr($text, 0, strrpos($text, ' '));
- if (mb_strlen($row['text']) > $counttext) {
- echo $text;
- echo "<a href=".base_url . 'news?articles&id='.$row['id']."> Читати далі . . .</a>";
- } else {
- echo $row['text'];
- } ?></p> <br/>
- <p>Дата публікації: <?php echo $row['date'];?> / <?php echo $row['time']; ?>
- <span class="author">Автор: <?php echo $row['author']."<br/>"; ?></span>
- </p><br/>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement