1
Answer

Display first 1000 words from a long string (Stripping HTML)

Photo of Churchill A

Churchill A

14y
2.8k
1
Hi all,
I have a field in my database that holds input from an html input. So I have <tags> in my db column data. What I need is to be able to extract this and display a short version of it as an intro. Maybe even the first paragraph if possible. 

I downloaded the Html Agility Pack for purposes of cleaning up html so now all I need is a function to count and return only the first 1000 words.

Thanks.


Answers (1)