อันนี้ตัวอย่างที่ผมจะใช้แก้ครับ
โค้ด: เลือกทั้งหมด
<?php
require_once('simple_html_dom.php');
$html = file_get_html('content.html');
$e = $html->find('article', 0)->find('section', 0);
echo $e;
?>
<section>
text1 name1</br>
text2 name2</br>
text3 name3</br>
text4 name4</br>
text5 name5</br>
</section>
//ต้องการแก้ข้อความให้เป็นแบบนี้ครับ
<section>
text1 <img src="pic1.jpg"></br>
text2 <img src="pic2.jpg"></br>
text3 <img src="pic3.jpg"></br>
text4 <img src="pic4.jpg"></br>
text5 <img src="pic5.jpg"></br>
</section>