-
Notifications
You must be signed in to change notification settings - Fork 0
/
read.php
58 lines (52 loc) · 1.18 KB
/
read.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<title>Data Mahasiswa</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th,
td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<?php
$file = "rizq.json";
$rizq = file_get_contents($file);
$data = json_decode($rizq, true);
?>
<table>
<thead>
<tr>
<th>No</th>
<th>NIM</th>
<th>Nama</th>
<th>Kelas</th>
<th>Prodi</th>
<th>Jurusan</th>
</tr>
</thead>
<tbody>
<?php foreach ($data as $d) : ?>
<tr>
<td><?php echo $d['no']; ?></td>
<td><?php echo $d['nim']; ?></td>
<td><?php echo $d['nama']; ?></td>
<td><?php echo $d['kelas']; ?></td>
<td><?php echo $d['prodi']; ?></td>
<td><?php echo $d['jurusan']; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</body>
</html>