Je reçois l'erreur suivantePHP, Erreur preg_match_all erreur modificateur inconnu?
[13-Sep-2011 07:26:28] PHP Warning: preg_match_all() [<a
href='function.preg-match-all'>function.preg-match-all</a>]: Unknown
modifier 'w' in D:\domains\wwwroot\php\search.php on line 274
La valeur de recherche est « réparer un pst » ce
$text1 = $result['ProgramName'] . " " . $result['ProgramVersion'];
$keywords1 = explode(" ",stripslashes($search));
foreach ($keywords1 as $k){
preg_match_all("/$k/i",$text1,$matches);
foreach ($matches[0] as $m){
$text1 = preg_replace("/$m/", '<span class="highlight">'.$m.'</span>', $text1);
}
}
Je suis vraiment assez perplexe le problème?
Pourquoi êtes-vous d'abord correspondant, puis en faisant tout ce travail correspondant à nouveau (en preg_replace)? – salathe