I am crawling the web for html, and when I use php strip_tags it smushes the entire html into one line removing all structure.
I would like to preserve structure, by replacing closing h, p and br tags with newlines.
Would a preg replace be the best solution for this?
Once I replaced all closing tags I would run a strip tags but this way I would have a basic structure.
1 Answer