<h3 style="text-align: center;"><?php echo strtoupper($nama) ?></h3>
<h4 style="text-align: center;">PERIODE : <?php echo $tanggal_mulai . ' s/d ' . $tanggal_selesai ?></h4>
<h4></h4>
<h4 style="text-align: left;">* Masukkan kode shift pada kolom tanggal</h4>
<table width="100%" style="border-collapse:collapse;" border="1">
    <tr>
        <td rowspan="2">NO</td>
        <td rowspan="2">NIK</td>
        <td rowspan="2">NAMA KARYAWAN</td>
        <td rowspan="2">CABANG</td>
        <td rowspan="2">DEPARTEMEN</td>
        <td rowspan="2">JABATAN</td>
        <td rowspan="2">ID_KARYAWAN</td>
        <td rowspan="2">ID_CABANG</td>
        <td colspan="<?php echo $jumlah + 1 ?>">PERIODE</td>
    </tr>
    <tr>
        <?php
            foreach ($header as $row) {
        ?>
                <td><?= $row; ?></td>
        <?php
            }
        ?>
    </tr>
    <?php
    $no = 1;
    foreach ($data as $row) {
    ?>
        <tr>
            <td><?= $no; ?></td>
            <td><?= "#".$row->nik."#"; ?></td>
            <td><?= $row->nama_lengkap; ?></td>
            <td><?= $row->kode_cabang." - ".$row->nama_cabang; ?></td>
            <td><?= $row->kode_departemen." - ".$row->nama_departemen; ?></td>
            <td><?= $row->kode_jabatan." - ".$row->nama_jabatan; ?></td>
            <td><?= "#".$row->id_karyawan."#" ?></td>
            <td><?= "#".$row->id_cabang."#" ?></td>
            <?php foreach ($header as $row) { ?>
                <td></td>
            <?php } ?>
        </tr>
    <?php
        $no++;
    }
    ?>
</table>