PHP HTML DOM PARSER-span class id

PHP HTML DOM PARSER-span class id

我正在使用 PHP 并使用 HTML DOM 解析器...并尝试检索..."STORE FRONT 9TERF" 我该如何实现?

<span class "id="yui_3_18_1_1_1437448946157_8369">"STORE FRONT 9TERF"<span class="value-suffix"></span></span>


include('simple_html_dom.php');
$html = new simple_html_dom();
$html->load_file("URL");

 foreach($html->find('span [id=yui_3_18_1_1_1437448000304_8422]') as $data){
    echo "Info: ";    echo $data->innertext; 

   }
//echo $html->save();

这样试试:

$html->find('span#yui_3_18_1_1_1437448000304_8422')

更多examples