Hey everybody !
I got this script which searchs on a data base for a word and returns me results, thats not a problem, then on PHP I'd like to mark in bold every word match I get in the results.
However if I search for the word 'menu' im going to get some results from mysql with the word 'menú' (notice the accent)
My usual algorithm to bold this would be
$find = 'menu';
$string = '.... in other languages we say menú asd ...';
$part1 = substr($string, 0, strpos( strtolower($string) ,strtolower($find)));
$part2 = substr($string, strpos(strtolower($string),strtolower($find)),strlen($find));
$part3 = substr($string,strpos(strtolower($string),strtolower($find))+strlen($find));
$boldedString = $part1 . "<b>".$part2."</b>".$part3;
How can I use strpos to match 'menú' if im searching for 'menu' :/ ??
I already tryed replacing the accents with googled functions, and mb_strpos doesnt seemz to work :/