This function will transform any string to an seo url like string. It suports latin, french and german special characters.

Example: applying the function to "Exemplo de aplicação da função" returns "exemplo-de-aplicacao-da-funcao"


PHP Code: 
    <?php
     
        
function seoUrl($str){
            
/** by Jonatas Urias B Teixeira    **/
            
$a = array('/(à|á|â|ã|ä|å|æ)/','/(è|é|ê|ë)/','/(ì|í|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø|œ)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| |\(|\))/','/[^a-z0-9_ -]/s','/-{2,}/s');
            
$b = array('a','e','i','o','u','c','d','n','ss','y','-','','-');
            return 
trim(preg_replace($a$bstrtolower($str)),'-');
        }
     
    
?>
Kevin Reviewed by Kevin on . SEO url string filter Using PHP This function will transform any string to an seo url like string. It suports latin, french and german special characters. Example: applying the function to "Exemplo de aplicação da função" returns "exemplo-de-aplicacao-da-funcao" <?php function seoUrl($str){ /** by Jonatas Urias B Teixeira **/ $a = array('/(à|á|â|ã|ä|å|æ)/','/(è|é|ê|ë)/','/(ì|í|î|ï)/','/(ð|ò|ó|ô|õ|ö|ø|œ)/','/(ù|ú|û|ü)/','/ç/','/þ/','/ñ/','/ß/','/(ý|ÿ)/','/(=|\+|\/|\\\|\.|\'|\_|\\n| Rating: 5