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:
$descrs = $html->find('.show_synopsis');
foreach($descrs as $descr) {
echo($descr->innertext);
}
This looks like:
<div class="show_synopsis">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr. <b>Source:</b> LORES.
</div>
Now, is it possible find and delete LORES from the above example?
Since LORES is a variable and can change, I was wondering if its possible to simply always find the word next to <b>Source:</b>?
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.