Hi everyone
I am having difficult with this issue using Simple_HTML_DOM, As you see the my simple codes
<?php
include('simple_html_dom.php');
$html = file_get_html('https://sport.premie...tz/sport/1/#');
foreach($html->find('div=[data-gamename="1X2"]') as $a){
echo $a->plaintext;
echo nl2br('\n');
}
?>
From the above code if i want retrieve values of <div class="games"></div>
it will work good and if i want to retrieve values from <div class="wrap"></div>
it will work good too and make to make a record this second div is inside the first div of <div class="games">
there it come another one inside the second div of <div class="wrap"></div>
it is called <div class="outcome active"></div>
My problem start here if i want to retrieve data from lets say <div class="outcome active">
it will work like charm but if i change the attribute lets say <data-gamename="1X2">
like in example above it will not work and and bring this error
i tried to solve with no lucky , As the code look above can any one help me where am wrong? You can see div code are in this format
<div class="games">==$0
<div class="wrap">
<div class="outcome" onclick="addBet(this)" id="outcome-225162629" data-gameid="61158022" data-outcomeid="225162629" data-gamename="1X2" data-eventname="Benevento Calcio - Carpi FC" data-eventcodeid="137" data-gamename="1X2">2.11</div>