PHP SimpleHTMLDomParser + Find lonely string

Rajput

New Member
I am using the SimpleHTMLDomParser to go through a html code and find various things. Everything works fine so far, but there is one problem:How do I find a string that has no ID, no class and no unique parent element?In my case, I started with extracting content from a div:\[code\]$descrs = $html->find('.show_synopsis');foreach($descrs as $descr) { echo($descr->innertext);}\[/code\]This looks like:\[code\]<div class="show_synopsis"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr. <b>Source:</b> LORES.</div>\[/code\]Now, is it possible find and delete \[code\]LORES\[/code\] from the above example?Since \[code\]LORES\[/code\] is a variable and can change, I was wondering if its possible to simply always find the word next to \[code\]<b>Source:</b>\[/code\]?I have tried a few different ways, but none worked so far. I have tried to adapt a solution from this post, but wasnt able to adjust them for my needs.
 
Back
Top