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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.