[eluser]k2zs[/eluser]
[quote author="nuwanda" date="1290695218"]
Code:
function get_slug($string){
$slug = preg_replace('/[^A-Za-z0-9-]+/', '-', strtolower($string));
return $slug;
}
That makes a slug.
That regex says, anything that is not an uppercase or lowercase character or number or dash, convert to a dash.
Yes, I know that CI has a slug function, but it was inconsistent for me. Something to do with not parsing dots. So I use the above.
I have simple needs.
;-)[/quote]
That did the trick... Thanks!