View Single Post
Old 05-27-2009, 10:33 AM   #4 (permalink)
ReSpawN
The Frequenter
 
ReSpawN's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
ReSpawN is on a distinguished road
Default

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"
Send a message via MSN to ReSpawN
ReSpawN is offline  
Reply With Quote