<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<div class="table-responsive">
<table id="restable" class="table table-sm table-light">
    <thead>
        <tr>
            <td>Tanggal</td>
            <td>Prize 1</td>
        </tr>
    </thead>
    <tbody>
<?php
    include '../../webgets.php';
    $page = file_get_html('https://egypt4dball.com/result');
    $findtable = $page->find('div[class="result text-center"]');

    foreach($findtable as $results) {
        echo '<tr>';

            $tng = $results->find('div[class="head"]');
                foreach($tng as $tanggal) {
                    $cur = trim(str_replace("WINNING NUMBER", "", $tanggal->plaintext));
                    echo '<td>'. $cur .'</td>';
                }

                $bodya = $results->find('div[class="body"]');
                foreach($bodya as $bod) {
                    if(strpos($bod, '<div class="row line m-0">') !== false) {
                        $bws = $bod->find('div');
                            foreach($bws as $keong) {
                                if(strpos($keong, '<b>1') !== false) {
                                        $ffe = $keong->find('div[class="col-6 p-0"]');
                                        foreach($ffe as $ttc) {
                                            echo '<td><span class="veniceballs">' .$ttc->plaintext .'</span></td>';
                                        }
                                }
                            }
                    }
                }

        echo '</tr>';    



        // echo '<tr>';
        //     $bap = $results->find('td');
        //     foreach($bap as $balls) {
        //         if(strpos($results, '<td class="date" style="width:14%">') !== false) {
        //         echo '<td>'.$balls->plaintext.'</td>';
        //         }
        //     }
        // echo '</tr>';

    }
    
    
?>
    </tbody>
</table>
</div>

<script>
        // $(document).ready(function() {
        //     $('#restable tbody tr').find('td:eq(1)').remove();
        //     $('#restable tbody tr').find('td:eq(2)').remove();
        //     $('#restable tbody tr').find('td:last-child').remove();
        // }); 
</script>