Advertisement
aguz99

logic2-1.php

Aug 1st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. $soal = "Soal 1";
  3. include '../functions.php';
  4. include 'tplLogic2.php';
  5.  
  6. if (isset($_POST['submit'])) {
  7.     $r = $_POST['range'];
  8.     echo "<table>";
  9.     for($y=1;$y<=$r;$y++) {
  10.         echo "<tr>";
  11.         for($x=1;$x<=$r;$x++) {
  12.             if ($x==$y) {
  13.                 td($x*2-1);
  14.             } else {
  15.                 td();
  16.             }
  17.         }
  18.         echo "</tr>";
  19.     }
  20.     echo "</table>";
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement