élimination des doublons

This commit is contained in:
2025-05-02 00:00:59 +02:00
parent 38344a315c
commit d852596386
3 changed files with 31 additions and 11 deletions

View File

@ -39,6 +39,15 @@ if (($lecteur = fopen("dico.csv", "r")) !== FALSE) {
}
fclose($lecteur);
}
foreach ($dico as $longueur => $mots) {
foreach ($mots as $mot => $definitions) {
if (count($definitions)) {
$dico[$longueur][$mot] = $definitions[array_rand($definitions)];
} else {
$dico[$longueur][$mot] = "";
}
}
}
function mots_espaces($longueur, $nb_mots_restants=MAX_MOTS)
{