<p> and <ul>/<ol>
HTMLの分析とタグの検索に関する私の他の質問に加えて、この質問。
$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;
}
これが私が得た距離です。以下を含む配列として $out を取得する方法は何ですか:
$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>');
前もって感謝します!私はdomdocument構造で本当に迷っています。