Increase SEO by using your article name/product name/category name/whatever in your URLs instead of a non-descriptive database ID.
function slug($string) {
$string = trim($string);
$string = strtolower($string);
$string = str_replace('&', 'and', $string);
$string = preg_replace('/[^a-z0-9-]/', '-', $string);
$string = preg_replace('/-+/', "-", $string);
return $string;
}




