PHP Get text between multiple <h1>&hellip;</h1> tags

no1uno

New Member
I have a page with multiple H1 headings followed by text and so on.Example:\[code\]<h1>Title 1</h1>Some text here<h1>Title 2</h1>Some more text here<h1>Title 3</h1>Even more text here\[/code\]etcWhat I want to do is create an array of elements, that is explode the HTML using as separator \[code\]<h1>ANY TEXT</h1>\[/code\] above that I have in an $output variable.The final purpose is to count the strlen of the text between the ending \[code\]</h1>\[/code\] and next starting \[code\]<h1>\[/code\] and if it's higher than 200 characters to hide it inside a \[code\]<span>\[/code\] with \[code\]display:none\[/code\] so users can press "Show all" to unhide that.How can I get that please?
 
Back
Top