안효원 안효원 2022-01-07
for2 add
@c8d0a3c5fad3e7f035011a8566ea9d9f7353591f
for.php
--- for.php
+++ for.php
@@ -18,6 +18,7 @@
         ?>
         <div id='sector'>
             <?php
+                echo "<h2>" . $i . "단 </h2>";
                 for($j = 1; $j <= 9; $j++){
                     echo $i . "X" . $j . "=" . ($i*$j) . "<br>" ;
                 }
 
for_table.php (added)
+++ for_table.php
@@ -0,0 +1,27 @@
+<!doctype html>
+<html lang="ko">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>for_table</title>
+    <style>
+        #page {background-color: antiquewhite; width: 720px; margin: 0 auto;}
+        table, td {border: 1px black solid;}
+    </style>
+</head>
+<body>
+    <div id="page">
+        <table>
+            <?php for($j = 1; $j <= 10; $j++){ ?>
+                <tr>
+                    <?php for($i = 1; $i <= 10; $i++){?>
+                        <td><?php echo $i . "열" ?></td>
+                    <?php } ?>
+                </tr>
+            <?php } ?>
+        </table>
+    </div>
+</body>
+</html>(No newline at end of file)
Add a comment
List