Results 1 to 1 of 1
-
19th Sep 2015, 05:47 PM #1
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.
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
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Easiest way to make SEO friendly links using PHP
By Kevin in forum PHP & PerlReplies: 0Last Post: 19th Sep 2015, 05:42 PM
Vn5socks.net 28-10-2024 | socks 5...
Live | 108.181.132.118:60677 | United States |...