1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
$pres=0;
$rep = array();
while($cpf = mysql_fetch_array($res)) {
similar_text(SuppAccents(str_replace('-',' ',strtolower($cpf['champ']))),SuppAccents(strtolower($cher)),$p);
if($p > $pres) {
$pres=$p;
}
array_push ($rep, $cpf);
}
while($cpf = array_shift($rep)) { ?>
<div>
<?php
similar_text(SuppAccents(str_replace('-',' ',strtolower($cpf['champ']))),SuppAccents(strtolower($cher)),$p);
if($p >= $pres-$tol) {
echo "Cette reponse est proche a " . $p . "%<br/>";
}
?>
</div>
<?php
} |
Partager