<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>

<div class="table-responsive">
  <table id="example1" class="table table-sm table-bordered table-striped">
    <thead>
      <tr>
        <th>No</th>
        <th>Nama Dokter</th>
        <th>Kode Dokter</th>
        <th>Jam Praktek</th>
        <th>Kapasitas</th>
      </tr>
    </thead>
    <tbody>
      <?php 
      $urut = 0; if(!empty($data['result'])){ foreach ($data['result'] as $key){ $urut++; ?>
        <tr>
          <td><?php echo $urut ?></td>
          <td><?php echo $key['namadokter'] ?></td>
          <td><?php echo $key['kodedokter'] ?></td>
          <td><?php echo $key['jampraktek'] ?></td>
          <td><?php echo $key['kapasitas'] ?></td>
        </tr>
      <?php }
      } else echo '<td colspan="5">Tidak ada data</td>'; ?>
    </tbody>
  </table>
</div>