This question already has an answer here:
Text to parse
<div id="test">some<b>bold</b> or <i>italic</i> text</div>
<div id="test">and again<b> bold text</b><i>and italic text<i></div>
Result i'd like to have
1 : some bold or italic text
2 : and again blod text and italic text
What I tried
string(//div)
normalize-space(//div)
Give the good formatting answer, but only one result came.
id('test')//text()
Give all text but split the result.
I tried to use string-join, or concat but with no luck. I want to do this in php.
</div>