05-27-2009, 10:33 AM
|
#4 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
I found and edited a function that does some of the work for me, either I wonder if I matched all the currently, most commonly used characters. Have a look;
PHP Code:
function tidyString($string){ $string = strtr($string, "ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ", "SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy"); $string = preg_replace('#\b\%\d.(|\b)#u', '', $string); $string = preg_replace('#\b\%\d.(|\b)#u', '+', $string); $string = preg_replace('#\b\+\++(|\b)#u', '+', $string); return $string;
}
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|