Welcome Guest, Not a member yet? Register   Sign In
Post excerpt implementation
#1

[eluser]Iwasignited[/eluser]
Hello,
I am making a blogging tool.
In the home page, I want to display posts but with the body shortened. If we use substr(), there will be problems with html tags. For example, sometimes it displays a broken image tag.
I'm looking for a solution to display the full img tag.
Please give me some advices.
Thanks.
#2

[eluser]umefarooq[/eluser]
its better you can create one intro field in your database field just save two three lines of your full story and save as just plain text without html and display it on home page.
#3

[eluser]danmontgomery[/eluser]
or use strip_tags() before you use substr.




Theme © iAndrew 2016 - Forum software by © MyBB