is there any PHP function available that replaces spaces and underscores from a string with dashes?
Like:
Some WordSome_WordSome___WordSome WordSome ) # $ ^ Word
=>some-word
basically, the sanitized string should only contain a-z
characters, numbers (0-9
), and dashes (-
).