Anyone know of any function to replace letters with accents with just the regular letter, for instance replace � with a, � with c, � with n ?
How about this ??? This is the one I made for this purpose
function stripAccents($string) {
$returnString = strtr($string,
'���������������������������������������������֊�����', 'aaaaaceeeeiiiinooooosuuuuyAAAAACEEEEIIIINOOOOOSUUUUY');
$returnString = str_replace('�','ae',str_replace('�','AE',$returnString));
$returnString = str_replace('�','o',str_replace('�','O',$returnString));
$returnString = str_replace('�','a',str_replace('�','�',$returnString));
$returnString = str_replace('�','ss',$returnString);
$returnString = str_replace(''','',str_replace("'",'',$returnString));
$returnString = str_replace('"','',str_replace('"','',$returnString));
return $returnString;
}
obviously there's room for improvement, but it's from a QAD script (not production)
-- Rene Brehmer aka Metalbunny
If your life was a dream, would you wake up from a nightmare, dripping of sweat, hoping it was over? Or would you wake up happy and pleased, ready to take on the day with a smile?
http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums at http://forums.metalbunny.net/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

