[ "default" => HAUTEUR_DEFAUT, "min_range" => HAUTEUR_MIN, "max_range" => HAUTEUR_MAX ] ]); $largeur = filter_input(INPUT_GET, 'colonnes', FILTER_VALIDATE_INT, [ "options" => [ "default" => LARGEUR_DEFAUT, "min_range" => LARGEUR_MIN, "max_range" => LARGEUR_MAX ] ]); $grille = new Grille($hauteur, $largeur, $id); $grille->current(); $definitions = [ "lignes" => [], "colonnes" => [] ]; foreach ($grille->lignes as $y => $mots) { $definitions["lignes"][$y] = []; foreach ($mots as $mot) { $definition = $dico[strlen($mot)][$mot]; if ($dico[strlen($mot)][$mot] != "") { $definitions["lignes"][$y][] = $definition; } } } foreach ($grille->colonnes as $x => $mots) { $definitions["colonnes"][$x] = []; foreach ($mots as $mot) { $definition = $dico[strlen($mot)][$mot]; if ($dico[strlen($mot)][$mot] != "") { $definitions["colonnes"][$x][] = $definition; } } } ?>