Hoa Posted April 29, 2010 Share Posted April 29, 2010 I have sumbit lots of articles to my blog, problem is the first article is too long and it takes most space of the homepage. It is difficult to have a overview of my blog for the visitors. But i have seen some other's website, there is a " read more" mark show at the starting of each article, how to edit it? Any one can help me here? Thanks Link to comment https://forums.phpfreaks.com/topic/200126-how-to-short-the-individual-article-on-the-home-page/ Share on other sites More sharing options...
Rustywolf Posted April 29, 2010 Share Posted April 29, 2010 you could either cut it off at x amount of letters (for instance, 100) using this: substr($text, 0, 100) or you could split it at each enter (to get the first paragraph) explode($text, '\n\n')\ i recommend the first Link to comment https://forums.phpfreaks.com/topic/200126-how-to-short-the-individual-article-on-the-home-page/#findComment-1050358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.