I'm working on a blog site and want to display list of blogs on the first page. Then user click on title to read more about it.
But I'm not getting how do I show few lines of the blogs. As, the blog text posted contains html elements, and which might have an image too.
I'm thinking of reading the text from the database and return only first 5 to 10 lines.
How could I read from a string line by line in php?
Any other suggestion would be appreciated.
Thanks
EDIT
this answer says about reading using file()
as array from file but I've to read it from database as a string.