I have seen this being done on the wordpress and i dont have access to word press :)
but i need to return a url string removing any non valid characters from it and converting some characters into appropriate characters :)
e.g.
1+ characters should be converted (of the following)
[space] = [dash] (1 dash) >>> (-)
[underscore] = [dash] (1 dash) >>> (-)
$str = 'Hello WORLD this is a bad string';
$str = convert_str_to_url($str);
//output//NOTE: caps have are lowercase :)
//hello-world-bad-string
and remove common and senseless words such as "the","a","in" etccc
at least point me on the right direction if u dnt have a gd code :)