<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Ecxcel Created</title>
<style>
table {
    border-collapse: collapse;
}

table, td, th {
    border: 1px solid black;
}
</style>
<style>
hr {
    display: block;
    height: 5px;
    border: 4;
    border-top: 2px solid black;
    margin: 1em 0;
    padding: 0; 
}
</style>
</head>
<body>
<center>
    <?php
      if ($tahun != '0') {
    ?>
    <h4>DATA HARI LIBUR TAHUN <?= $tahun ?></h4>
    <?php
      }else{
    ?>
     <h4>DATA HARI LIBUR</h4>
    <?php
      }
    ?>
</center>    
<br>
              <table width="500" height="144" style="font-size:10px;border-collapse: collapse;border: 1px solid black;">
                <thead>
                  <tr>
                    <th style="text-align: center;">No.</th>
                    <th style="text-align: center;">Tanggal</th>
                    <th style="text-align: center;">Keterangan</th>
                  </tr>
                </thead>
                <tbody id="data">
      <?php
      $no=0;
      foreach ($data as $rows):
        $no++;  
          ?>
        <tr>
          <td ><?php echo $no?></td>
          <br><td style="text-align: left;"><?php echo  date('d-m-Y', strtotime($rows->tanggal)) ?></td>
          <br><td><?php echo $rows->keterangan ?></td>
        </tr>
    <?php endforeach?>                
                </tbody>
              </table>
                <br />
                <br />
                <br />
</p>                
</body>
</html>

