nombre de mots
This commit is contained in:
parent
e04b6f0b91
commit
b3ad38815f
8
dico.php
8
dico.php
@ -13,9 +13,13 @@ if (($lecteur = fopen("dico.csv", "r")) !== FALSE) {
|
|||||||
if (substr($ligne[0], 0, 1) != "#" && count($ligne) >= 3) {
|
if (substr($ligne[0], 0, 1) != "#" && count($ligne) >= 3) {
|
||||||
[$mot, $definition, $auteur] = $ligne;
|
[$mot, $definition, $auteur] = $ligne;
|
||||||
if ($auteur) {
|
if ($auteur) {
|
||||||
$dico[$mot] = "$definition <small><em>$auteur</em></small>";
|
$dico[strtoupper($mot)] = "$definition <small><em>$auteur</em></small>";
|
||||||
} else {
|
} else {
|
||||||
$dico[$mot] = $definition;
|
$dico[strtoupper($mot)] = $definition;
|
||||||
|
}
|
||||||
|
$nb_espaces = substr_count($mot, ' ');
|
||||||
|
if ($nb_espaces > 0) {
|
||||||
|
$dico[$mot] .= " <small>(" . ($nb_espaces + 1) . " mots)</small>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user