Created
September 5, 2014 13:01
-
-
Save mathieuletyrant/f5c779e8a908e7a4c1d6 to your computer and use it in GitHub Desktop.
Create a Slug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create_slug($string){ | |
$slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string); | |
return $slug; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment