Last active
January 25, 2023 19:02
-
-
Save bobbydank/6f02df8ec96c890021d7aea9fea98fbc to your computer and use it in GitHub Desktop.
takes a string and makes a css class out of it.
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
<?php | |
function _classify($string) { | |
$string = preg_replace("/[^A-Za-z ]/", '', strtolower($string)); | |
return str_replace(' ', '-', $string); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment