Membuat tabel sederhana
menggunakan php, script bisa memabantu kita bagi pelajar PHP pemula untuk
mengetahui teknik - teknik dalam pembuatan web berbasis php
Untuk scrpt PHP menciptakan tabel sederhana bisa dilihat dibawah ini :
Untuk scrpt PHP menciptakan tabel sederhana bisa dilihat dibawah ini :
<?php
echo "<h1> Contoh Beberapa Tabel PHP </h1>";
echo "<hr>";
echo "Tabel satu kolom";
echo "<table width = 500 border =1>
<tr>
<td> Tabel satu kolom </td>
</tr>
</table>";
?>
<?php
echo "<br>";
echo "Tabel dua kolom";
echo "<table width = 500 border =1>
<tr>
<td> kolom pertama </td>
<td> kolom ke dua </td>
</tr>
</table>";
?>
<?php
echo "<br>";
echo "Tabel dua baris";
echo "<br>";
echo "<table width = 500 border =1>
<tr>
<td>baris pertama</td>
</tr>
<tr>
<td>baris kedua</td>
</tr>
</table>";
?>
<?php
echo "<br>";
echo "Tabel dua baris dua kolom";
echo "<br>";
echo "<table width = 500 border =1>
<tr>
<td>baris pertama</td>
<td>baris ketiga</td>
</tr>
<tr>
<td>baris kedua</td>
<td>baris ke empat</td>
</tr>
</table>";
?>
<?php
echo "<br>";
echo "Semua TAbel Bewarna";
echo "<br>";
echo "<table width = 500 border =1 bgcolor= 00fffff>
<tr>
<td>baris pertama</td>
<td>baris ketiga</td>
</tr>
<tr>
<td>baris kedua</td>
<td>baris ke empat</td>
</tr>
</table>";
?>
<?php
echo "<br>";
echo "Hanya kolom yang bewarna";
echo "<br>";
echo "<table width = 500 border =1>
<tr bgcolor=00fffff>
<td>baris pertama</td>
<td>baris ketiga</td>
</tr>
<tr>
<td>baris kedua</td>
<td>baris ke empat</td>
</tr>
</table>";
?>

EmoticonEmoticon