waverider303 Posted January 6, 2010 Share Posted January 6, 2010 I have a database of of blog posts and I want to display only a handful of characters from the post. I know of substr and all those but is there a way to have it ignore html code. MY content in the database includes <p> and <span> tags. I dont want substr to count those as characters so that it wont cut out some of my code. Quote Link to comment Share on other sites More sharing options...
vinpkl Posted January 6, 2010 Share Posted January 6, 2010 you can strip those tags http://php.net/manual/en/function.strip-tags.php or you want to have those tags inside your content but dont want to count them. vineet Quote Link to comment Share on other sites More sharing options...
waverider303 Posted January 6, 2010 Author Share Posted January 6, 2010 I want to include them but do not want them to count. Quote Link to comment 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.