phpsimple-html-domphp-parser

PHP Simple HTML DOM Parser div selector


I have div, and want get 7,89 number, my selector is

<div class="titlePageSprite star-box-giga-star"> 7,89 </div>

$ret['Rating'] = $html->find('div.star-box-giga-star')->content;

but I get empty array, what I doing wrong ?


Solution

  • try this:

    $ret['Rating'] = $html->find('div.star-box-giga-star', 0)->innertext;