PhpNo Comments

default thumbnail

Substr() is used to show limited content. If we want to show limited characters in a paragraph, then we use substr. Here is how we use substr.

PHP

<p><?=substr(strip_tags($row['articles_text']),0,120)?> ...</p>

Above code will show 120 characters. After content, it will show three dots(…)

Be the first to post a comment.

Add a comment