- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
function cleanUrl( $url ){
$new_url = str_replace( " ", "-", $url );
$new_url = str_replace( "/", "-", $new_url );
$new_url = str_replace( "--", "-", $new_url );
$new_url = str_split( $new_url );
$new_url = preg_grep( "<[A-Za-z0-9-_]+>", $new_url );
$new_url = trim( implode( $new_url ) );
$new_url = strtolower($new_url);
// Was still getting cases of double hyphens
$new_url = str_replace( "--", "-", $new_url );
return $new_url;
}// end function - cleanUrl
telnet 27.11.2010 19:25 # 0
Yurik 27.11.2010 19:49 # 0
mr.The 27.11.2010 22:05 # 0
Jakkk 03.12.2010 21:17 # 0