Theres this script floating around the web that replaces special characters with dashes but instead I would like specifically punctuation to NOT be replaced with anything but to just be removed... no white space, no dash.
example:
today's weather is hot!
good::
todays-weather-is-hot
bad:
today-s-weather-is-hot-
This script replaces does that bad example... how to make it do the good?:
function secUrl($string){
$string = strtolower($string);
$string = preg_replace('/[^a-zA-Z0-9]/i','-',$string);
$string = preg_replace("/(-){2,}/",'$1',$string);
return $string;
}