ehm, non ti è piaciuta?

$uri = strtolower(preg_replace('/[^A-Za-z0-9']+/', '-', $titolo));