This commit is contained in:
2026-01-10 21:53:14 +01:00
parent f473cc24eb
commit 02f17f78bf
2 changed files with 17 additions and 15 deletions

View File

@@ -30,17 +30,8 @@ function dico($longueur_max) {
if (strlen($mot) > $longueur_max) continue;
$dico[strlen($mot)][$mot] = [];
$dico[strlen($mot)][$mot] = $definitions;
if ($nb_mots > 1) $dico[strlen($mot)][$mot]["nb_mots"] = $nb_mots;
foreach ($definitions as $definition) {
if (is_array($definition)) {
foreach ($definition as $auteur => $def) {
$dico[strlen($mot)][$mot][] = ["auteur" => $auteur, "definition" => $def];
}
} else if (is_string($definition)) {
$dico[strlen($mot)][$mot][] = ["definition" => $definition];
}
}
}
return $dico;