violinrocker Posted September 5, 2009 Share Posted September 5, 2009 if i have in my fetched row "A summary or recap is a shortened version of the original. The main purpose of such a simplification is to highlight the major points from the original (much longer) subject, e.g. a text, a film or an event. The target is to help the audience get the gist in a short period of time." how do i limit the letters so that it would look like"A summary or recap is a shortened version of the original. The main purpose of such a simplification is to highlight the major points from the original..." Link to comment https://forums.phpfreaks.com/topic/173199-limit-letters-of-fetched-rows/ Share on other sites More sharing options...
bundyxc Posted September 5, 2009 Share Posted September 5, 2009 So, you want to show the first 151 characters, then add and ellipsis? $haystack= "A summary or recap is a shortened version of the original. The main purpose of such a simplification is to highlight the major points from the original (much longer) subject, e.g. a text, a film or an event. The target is to help the audience get the gist in a short period of time."; $needle = substr($haystack, 0, 151); $newString = $needle . '...'; print($newString); Link to comment https://forums.phpfreaks.com/topic/173199-limit-letters-of-fetched-rows/#findComment-912983 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.