Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title> Sudoku </title>
- <link type="text/css" rel="stylesheet" href="sudoku.css">
- </head>
- <body>
- <h2 id = "title" class="center"> Sudoku </h2>
- <table>
- <?php
- $cells = array_fill(0, 9, array_fill(0, 9, 9));
- for($i=0; $i<9; $i++){
- for($k=0; $k<9; $k++) {
- $cells[$i][$k] = 'c' . "$i" . "$k";
- }
- } // fill $cells with XY coordinates of each cell
- for($i=0;$i<9;$i++){
- echo "<tr>";
- for($k=0;$k<9;$k++){
- echo '<td><div class = "cell" id="' . $cells[$i][$k] . '">' . '</div>';
- }
- } // creates the grid, each cell containing a <div> with an ID
- ?>
- </table>
- <script src = "sudoku.js"> </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement