![PHP string cleaner](https://tipoit.net/wp-content/uploads/2023/09/string-clean-1.png)
PHP string cleaner
This example uses two regular expressions to strip the inserted string of all symbols, extra hyphens and extra white spaces so the end result is a clean text structure that contains lowercase words, and only one hyphen between each word. This has many use-case scenarios, for example, you can use it in a custom CMS for inserting clean SEO friendly blog titles, or url-s, based on the text that the author inserts in the input field.
Comments (0)