ElijahLoop Posted February 27, 2021 Share Posted February 27, 2021 (edited) 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. Edited February 27, 2021 by ElijahLoop change text Quote Link to comment https://forums.phpfreaks.com/topic/312222-how-to-shorten-a-text/ Share on other sites More sharing options...
Barand Posted February 27, 2021 Share Posted February 27, 2021 You need to show us what you've tried so far before we help you with your homework. Quote Link to comment https://forums.phpfreaks.com/topic/312222-how-to-shorten-a-text/#findComment-1584791 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.