<?php
echo "<table width='30%' align='center' border='1'>";
for($x=1; $x<=10; $x++) {
switch($x) {
case 1:
case 5:
case 7: $mau="red";
break;
case 2:
case 8:
case 9: $mau="blue";
break;
default: $mau="green";
break;
};
echo "<tr bgcolor='$mau'>";
for($y=1; $y<=5; $y++) {
echo "<td>0</td>";
}
echo "</tr>";
};
echo "</table>";
?>
0 comments:
Post a Comment