Jump to content

Find a string in HTML, then truncate the rest


Gimple

Recommended Posts

I'm creating a content site where I show previews of the articles.

 

In the HTML (which is stored as a TEXT row in my database) there is a <a name="continue"></a> tag in it.

 

I want to end up with a variable that has everything before that tag to display to my user, and cut off everything after it (and including it).

 

What's the best, or a good way, to accomplish this?

Link to comment
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.