Results 1 to 2 of 2
Threaded View
-
19th Sep 2015, 05:48 PM #2
You can also try below method
The following function will return a SEO friendly URL using a supplied string.
PHP Code:<?php
function seo($string){
$string = preg_replace("`\[.*\]`U","",$string);
$string = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string);
$string = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i","\\1", $string );
$string = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $string);
$string = htmlentities($string, ENT_COMPAT, 'utf-8');return strtolower(trim($string, '-'));
}
?>
-
The Following 1 Users Say Thank You to Kevin For This Useful Post:
- [ Click to Expand ]
-
BHK (21st Sep 2015)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Shopsocks5.com - Check Socks5...
[Free Trial] https://shopsocks5.com/ - Service...