Useful function for taking the title of an Article or keyword phrase and converting it into an SEO friendly version that can be used in a URL.
For example, the title "German Cars are amazing" would be transformed into "german-cars-are-amazing".

PHP Code: 
    function getSeoVersion($phrase) {
      return 
preg_replace('/[^a-z0-9_-]/i'''strtolower(str_replace(' ''-'trim($phrase))));
    }
     
    
// example usage:
    
echo getSeoVersion("German cars are amazing."); 
Kevin Reviewed by Kevin on . How To Convert phrase into SEO friendly version Useful function for taking the title of an Article or keyword phrase and converting it into an SEO friendly version that can be used in a URL. function getSeoVersion($phrase) { return preg_replace('//i', '', strtolower(str_replace(' ', '-', trim($phrase)))); } // example usage: echo getSeoVersion("German cars are amazing."); Rating: 5