Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>Dean Beniqno XI RPL 2</title>
- <style>
- th{
- background-color: blue;
- }
- td:nth-child(even){
- background-color: skyblue;
- }
- td:nth-child(odd){
- background-color : #eaeaea;
- }
- table{
- width : 40%;
- }
- </style>
- </head>
- <body>
- <center>
- <table border="1">
- <tr>
- <td>NIS</td>
- <td>Nama</td>
- <td>Kelas</td>
- <td>Jurusan</td>
- </tr>
- <?php
- $siswa = array('1314115690'=> array('nama' => 'Bruce Banner', 'Kelas' => 'MIF1', 'Jurusan' => 'MIF'),
- '1314115692'=> array('nama' => 'Stephen Strange', 'Kelas' => 'MIF2', 'Jurusan' => 'MIF'),
- '1314115693'=> array('nama' => 'Matt Murdock', 'Kelas' => 'MIF3', 'Jurusan' => 'MIF'),
- '1314115699'=> array('nama' => 'Peter Parker', 'Kelas' => 'MIF1', 'Jurusan' => 'MIF'));
- foreach($siswa as $nis => $value)
- {
- echo '<tr>';
- echo '<td>'. $nis. '</td>';
- echo '<td>'. $value['nama']. '</td>';
- echo '<td>'. $value['Kelas']. '</td>';
- echo '<td>'. $value['Jurusan']. '</td>';
- echo '</tr>';
- }
- ?>
- </table>
- </center>
- </body>
- </html>
Add Comment
Please, Sign In to add comment