Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $string=($post['content']);
- if(strlen($string) >255) {
- $stringCut = substr($string, 0, 255 );
- $trimmedString = trim($stringCut, " ");
- echo ($trimmedString);
- ?>....<a href="<?=APP_ROOT?>/home/view/<?=htmlspecialchars($post['post_id'])?>">Покажи цялата новина</a>
- <?php
- } else {
- ?>
- <p><?=htmlentities($post['content'])?></p>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement