occurence pluriel sur une ligne

This commit is contained in:
Fred Tempez 2020-08-19 15:31:03 +02:00
parent 3731ef209a
commit 1f4ba11970

View File

@ -213,8 +213,7 @@ class search extends common {
$t = preg_replace($motclef, '<span class="searchKeyword">\1</span>',$t);
// Sauver résultat
$resultat .= '<p class="searchResult">'.$t.'...</p>';
$o = count($matches[0]) === 1 ? ' occurence<p>' : ' occurences<p>';
$resultat .= '<p class="searchTitle">'.count($matches[0]) . $o;
$resultat .= '<p class="searchTitle">'.count($matches[0]) . (count($matches[0]) === 1 ? ' occurence<p>' : ' occurences<p>');
//}
return ([
'matches' => count($matches[0]),