Here is simple Function to create slug from string.
function getSlug($title)
{
$slug
= preg_replace("/[^a-zA-Z0-9 ]/", "", $title);
$slug = str_replace(" ",
"-", $slug);
$slug=strtolower($slug);
return($slug);
}
No comments:
Post a Comment