AlyxDumbass

Untitled

Oct 8th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.73 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7.     <title>Dean Beniqno XI RPL 2</title>
  8.  
  9.     <style>
  10.         th{
  11.             background-color: blue;
  12.         }
  13.         td:nth-child(even){
  14.             background-color: skyblue;
  15.         }
  16.         td:nth-child(odd){
  17.             background-color : #eaeaea;
  18.         }
  19.         table{
  20.             width : 40%;
  21.         }
  22.     </style>
  23. </head>
  24. <body>
  25.     <center>
  26.     <table border="1">
  27.         <tr>
  28.             <td>NIS</td>
  29.             <td>Nama</td>
  30.             <td>Kelas</td>
  31.             <td>Jurusan</td>
  32.         </tr>
  33.  
  34.         <?php
  35.            $siswa = array('1314115690'=> array('nama' => 'Bruce Banner', 'Kelas' => 'MIF1', 'Jurusan' => 'MIF'),
  36.                            '1314115692'=> array('nama' => 'Stephen Strange', 'Kelas' => 'MIF2', 'Jurusan' => 'MIF'),
  37.                            '1314115693'=> array('nama' => 'Matt Murdock', 'Kelas' => 'MIF3', 'Jurusan' => 'MIF'),
  38.                            '1314115699'=> array('nama' => 'Peter Parker', 'Kelas' => 'MIF1', 'Jurusan' => 'MIF'));
  39.  
  40.                            foreach($siswa as $nis => $value)
  41.                            {
  42.                                echo '<tr>';
  43.                                echo '<td>'. $nis. '</td>';
  44.                                echo '<td>'. $value['nama']. '</td>';
  45.                                echo '<td>'. $value['Kelas']. '</td>';
  46.                                echo '<td>'. $value['Jurusan']. '</td>';
  47.                                echo '</tr>';
  48.  
  49.                            }
  50.         ?>
  51.     </table>
  52.     </center>
  53. </body>
  54. </html>
Add Comment
Please, Sign In to add comment