Php Domdocument Get Text After Tag March 02, 2024 Post a Comment I have this in my php file. Text I need this text... next p Baca JugaUse Php To Get Tags Within A Set Tag Id, Class Or Other From A WebsiteHow To Use Javascript Variable In An Html LinkSemantic Html Tag For Displaying A Path/directory? ... and this '; $dom=ne Solution 1: Use DOMXPath:$xpath = new DOMXpath($domDocument); foreach ($xpath->query('//div/text()') as$textNode) { echo$textNode->nodeValue; } Copy Share You may like these postsHow To Replace Img Src And Link Href In A Document With A Mustache Expression?Domdocument Parse HtmlPhp Using Domxpath To Strip Tags And Remove NodesPhp Domdocument / Xpath: Get Html-text And Surrounded Tags
Post a Comment for "Php Domdocument Get Text After Tag"