transform and convert characters
Posted: Wed Nov 18, 2009 5:02 pm
What can I do to compare Catano with Cataño so that they are the same. I tried different methods to convert the characters but they dont seem to work. For example:
I am using utf-8 in my pages and database
thank you
Code: Select all
function translate($string)
{
$accented =array('ñ','á','ú','í','é','ó');
$replace =array('n','a','u','i','e','o');
return str_replace($accented, $replace, $string);
}
thank you