PHP code example of endroid / sudoku
1. Go to this page and download the library: Download endroid/sudoku library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
endroid / sudoku example snippets
php
use Endroid\Sudoku\Puzzle;
// Load a puzzle
$sudoku = new Sudoku('
000000012
000000003
002300400
001800005
060070800
000009000
008500000
900040500
470006000
');
// Solve the puzzle
$solver = new Solver($sudoku);
$solver->solve();