Jump to content

substr() but ignoring html code


waverider303

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/187374-substr-but-ignoring-html-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.