In addition to my other question about the analyzing of html, and searching for <p> and <ul>/<ol>
tags this question.
$in = '<p>Bit\'s of text</p><p>another paragraph</p><ol><li>item1</li><li>item2</li></ol><p>paragraph</p>';
function geefParagrafen($in){
$dom = new domDocument;
$dom->loadHTML($in);
$x = $dom->documentElement;
}
this is how far i got. What is the way to get an $out as an array containing the following:
$out = array('<p>Bit's of text</p><p>another paragraph</p>',
'<p>another paragraph</p>',
'<ol><li>item1</li><li>item2</li></ol>',
'<p>paragraph</p>');
Thanks in advance! I'm really lost in the domdocument structure.