How to check if a SimpleHTMLDom element does not exist

前端 未结 4 1075
忘了有多久
忘了有多久 2021-01-18 15:16

SimpleHtmldom can be used to extract the contents of the first element with class description.

$html = str_get_html($html);
$html->find(\'.d         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-18 15:53

    $avalable = ($element->find('span.sold-out-text', 0)) ? 1 : 0;
    

    It works for me.

提交回复
热议问题