<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 text-center 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://kuwaitlottery.co/?page=result');
    $findtable = $page->find('div[class="row mt-2"] div[class="col-xl-12 mb-2"]');

        foreach($findtable as $results) {
            echo '<tr>';
            $cii = $results->find('div[class="card"] div[class="card-body"] div[class="row"] div[class="col-xl-3 mb-2"]');
            
                foreach($cii as $ffl) {
                    if(strpos($ffl, '<h6>Date:</h6>') !== false) {
                        $res = $ffl->find('span');
                        foreach($res as $tto) {
                            echo '<td>'. date("d-m-Y", strtotime($tto->plaintext)) . '</td>';
                        }
                    }
                }


            $fwj = $results->find('div[class="card"] div[class="card-body"] div[class="row"] div[class="col-xl-3 mb-2"]');

                foreach($fwj as $ddi) {
                    if(strpos($ddi, 'Winning Number #1') !== false) {
                        $rmd = trim(str_replace('Winning Number #1', '', $ddi->plaintext) );
                        echo '<td><span class="veniceballs">'.$rmd.'</span></td>';
                        
                    }
                }

                
            echo '</tr>';
        
        }   
    
?>
    </tbody>
</table> 
 </div>

<!-- <script>
        $(document).ready(function() {
            $('div.col-xl-4').remove();
            var divs = $('.col-xl-2');
            divs.addClass('col-xl-3');
            divs.removeClass('col-xl-2');
        }); 
</script> -->

