How to shorten a text?

A

Anonymous

Guest
The $a variable contains the news text. The $link variable contains a link to the page with the full text of this news.
Need to write the abbreviated text of the news in the $b variable according to the rules:
- crop up to 180 characters
- assign an ellipsis
- make the last 2 words and ellipsis a link to the full text of the news.
 
Back
Top