<table class="table table-striped table-bordered table-hover dataTables-example" >
<thead>
<tr>
<th>Nama Murid</th>
<th>Nilai</th>
</tr>
</thead>
<tbody>
<?php $no=1; ?>
<?php foreach ($murid as $row_murid) { ?>
<tr class="gradeX">
<td ><?php echo $row_murid['nama_murid']; ?></td>
<?php foreach ($nilai as $row_nilai) { ?>
<?php /* disini dicek dulu apakah $row_nilai['id_murid'] == $row_murid['id'], kalau sama baru tampilkan nilai */ ?>
<td><?php echo $row_nilai['nilai']; ?></td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
Comments