标签:function
function drawTable($width,$height){
echo "<table style=‘color:#fff‘>";
for($i=0;$i<$width;$i++){
if($i%2==0){
echo "<tr style=‘background:red;‘>";
}else{
echo "<tr style=‘background:green;‘>";
}
for($j=$i*$width;$j<($i+1)*$height;$j++){
echo "<td>";
echo $j;
echo "</td>";
}
echo "</tr>";
}
echo "</table>";
}
drawTable(4,4);
标签:function
原文地址:http://12155715.blog.51cto.com/12145715/1865932