I have the attached code. When this code runs, sometimes the target page is missing a specific <span> tag and causes an error. I would like for this code to be altered to where if the specific <span> tag is not found, for it to jump to this part of the code.
$sql = "update page_category set category_tag = 1 where id ='".$cateid."'";
This way it will continue to run without my input.
The part it is not finding is this:
$total = $html->find('h2.results-summary',0)->find("span",1)->plaintext;
Let me know if there are any questions.