studi - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of studi.php
- <!DOCTYPE html>
- <html>
- <head>
- <title>Studi Kasus</title>
- <style>
- th{
- background-color: cyan;
- border: 1px solid orange;
- }
- td{
- background-color: gewwn;
- border: 1px solid salmon;
- }
- body{
- background-color: lightgrey;
- }
- </style>
- </head>
- <body>
- <table border="1" cellpadding="5" align="center">
- <tr>
- <th>NIS</th>
- <th>Nama</th>
- <th>Kelas</th>
- <th>Jurusan</th>
- </tr>
- <?php $siswa = [
- ['NIS' => '1314115690',
- 'Nama' => 'Bruce Banner',
- 'Kelas' => 'MIF1',
- 'Jurusan' => 'MIF'],
- ['NIS' => '1314115692',
- 'Nama' => 'Stephen Strange',
- 'Kelas' => 'MIF2',
- 'Jurusan' => 'MIF'],
- ['NIS' => '1314115692',
- 'Nama' => 'Stephen Strange',
- 'Kelas' => 'MIF2',
- 'Jurusan' => 'MIF'],
- ['NIS' => '1314115692',
- 'Nama' => 'Stephen Strange',
- 'Kelas' => 'MIF2',
- 'Jurusan' => 'MIF']
- ];
- for ($i=0; $i < 4 ; $i++) {
- echo "<tr>";
- echo "<td>" . $siswa[$i]['NIS'] . "</td>";
- echo "<td>" . $siswa[$i]['Nama'] . "</td>";
- echo "<td>" . $siswa[$i]['Kelas'] . "</td>";
- echo "<td>" . $siswa[$i]['Jurusan'] . "</td>";
- echo "</tr>
- ";
- }
- ?>
- </table>
- </body>
- </html>
File Description
- studi
- PHP Code
- 29 Oct-2019
- 1.17 Kb
You can Share it:
Latest PHP Pastes