<?php require_once 'controller.php'; require_once 'model.php'; $controller = new Controller(); $model = new Model(); $form = $controller->indexAction()[0]; $winner = $controller->indexAction()[1]; ?> <html> <?php if (empty($_POST)) { echo '<h1>Вы начинаете игру</h1>'; echo '<h3>Для совершения хода введите <b>"x"(латинская строчная икс)</b> в нужное поле</h3>'; } echo '<h1>', $winner, '</h1>'; ?> <form style="text-align: center;" action="" method="post"> <?php for ($i = 1; $i < 4; $i++) { echo '<input style ="text-align: center; font-size: 100px; width: 100px;height: 100px;" type = "text" name= "' . $i . '1" value = "' . $form[$i . "1"] . '">'; echo '<input style ="text-align: center; font-size: 100px; width: 100px;height: 100px;" type = "text" name= "' . $i . '2" value = "' . $form[$i . "2"] . '">'; echo '<input style ="text-align: center; font-size: 100px; width: 100px;height: 100px;" type = "text" name= "' . $i . '3" value = "' . $form[$i . "3"] . '">'; echo '<br>'; } ?> <input type="submit" value="Ходить"> <br> <a href="">Заново</a> </form> </html>