shahzad429 Posted May 10, 2011 Share Posted May 10, 2011 What i want to is if content is more than one line but script should display only one line and add "...more" at the end of it. so that i can make it a link to the article. is this possible? Thanks in advance for the help and support. Link to comment https://forums.phpfreaks.com/topic/236005-display-only-1-line-of-content-and-add-more-at-the-end/ Share on other sites More sharing options...
cyberRobot Posted May 10, 2011 Share Posted May 10, 2011 You could use substr() to to get the desired length of the string, then just add the "...more" link afterwards. http://php.net/manual/en/function.substr.php Link to comment https://forums.phpfreaks.com/topic/236005-display-only-1-line-of-content-and-add-more-at-the-end/#findComment-1213304 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.