--- for_table.php
+++ for_table.php
... | ... | @@ -14,18 +14,15 @@ |
14 | 14 |
<body> |
15 | 15 |
<div id="page"> |
16 | 16 |
<table> |
17 |
- <?php for($j = 1; $j <= 10; $j++){ ?> |
|
17 |
+ <?php for($i = 0; $i <= 9; $i++){?> |
|
18 | 18 |
<tr> |
19 |
- <?php for($i = 1; $i <= 10; $i++){?> |
|
20 |
- <td><?php echo $i . "열" ?></td> |
|
21 |
- <?php } ?> |
|
19 |
+ <?php for($j=$i*10; $j <= $i*10+10; $j++){ ?> |
|
20 |
+ <td><?php echo $j ?></td> |
|
21 |
+ <?php } ?> |
|
22 | 22 |
</tr> |
23 | 23 |
<?php } ?> |
24 | 24 |
</table> |
25 | 25 |
<br> |
26 |
- <?php for($j = 1; $j <= 10; $j++){ ?> |
|
27 |
- <div>ha ha ha</div> |
|
28 |
- <?php } ?> |
|
29 | 26 |
</div> |
30 | 27 |
</body> |
31 | 28 |
</html>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?