The perfect php clean url generator
Been searching for a way to basically clean a title so that I could add that to my URL which had accents as I was dealing with French content.
First search on Google got me to this website and the function below worked a treat:
function toAscii($str, $delimiter = '-')
$clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str);
$clean = preg_replace("/[^a-zA-Z0-9\/_|+ -]/", '', $clean);
$clean = strtolower(trim($clean, '-'));
$clean = preg_replace("/[\/_|+ -]+/", $delimiter, $clean);