Jump to content

Find a string in HTML, then truncate the rest


Go to solution Solved by 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

This thread is more than a year old.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.