老师请检查一下子
来源:2-12 编程练习
长城greatwall
2019-12-26 12:16:24
<?php
echo "<table>";
$a=1;
$b=1;
while($a<6){
echo "<tr>";
while($b<6){
echo "<td>".$b."</td>";
}
echo "</tr>";
}
echo "</table>";
?>
2回答
长城greatwall
提问者
2019-12-26
哈哈哈 多谢 知道啦
guly
2019-12-26
你好,贴出代码运行效果有误,建议查看正确代码:
<?php
echo '<table width="500" border="1">';
$a=1;
while($a<6){
echo "<tr>";
$b=1;
while($b<6){
echo "<td>".$b."</td>";
$b++;
}
$a++;
}
echo "</table>";
?>如果解决了您的问题请采纳,祝学习愉快!
相似问题