php - simple html dom extracting table by its id -


i'm using simple html dom in php extract table depending on id. have done without issues when id doesn't involve characters hyphens(-). suspect due hyphen because used same code id no hyphens , no trouble receiving data. data want extract in tab hidden, effect process?

here code

<?php  include('simple_html_dom.php');  //insert url want extract data $html = file_get_html('http://espnfc.com/team/_/id/359/arsenal?cc=5739');  $i = 0; $dataintable = true;  while($dataintable){      if($html->find('div[id=ui-tabs-1] table tbody', 0)->children(0)->children($i)){              for($j=0;$j<3;$j++){                  if($html->find('div[id=ui-tabs-1] table tbody', 0)->children(0)->children($i)->children($j)){                     $gk[] = $html->find('div[id=ui-tabs-1] table tbody', 0)->children(0)->children($i)->children($j)->plaintext;                 }else{                 $dataintable = false;                 }             }              //else if nothing in next cell return false.         }else{             $dataintable = false;         }       $i+=2; } var_dump($gk);  ?> 

here html content enter image description here

when take @ source(not via dev-tools, use browser->viewsource) of http://espnfc.com/team/_/id/359/arsenal?cc=5739 you'll not see id ui-tabs-1

this element has been created via javascript(i guess jqueryui-tabs)

simple_html_dom parses html did not evaluate javascript, answer is:

you can't select element


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -