Notice: Trying to access array offset on value of type bool in /home/nicks/public_html/wp-content/plugins/jetpack/modules/theme-tools/social-menu.php on line 65
Nick Stallman
Notice: Trying to access array offset on value of type bool in /home/nicks/public_html/wp-content/plugins/jetpack/modules/theme-tools/social-menu.php on line 65

Strip all but certain characters from a string in PHP (such as alphanumeric, numeric, etc…)

The #1 result in Google for stripping characters out of strings in PHP is awful and uses the deprecated ereg_replace function so lets make a new search result using preg_replace which is much better, faster and it is fully supported in PHP 5 and 7. Allow only alpha-numeric: Only numeric: Alpha-numeric with whitespace: The ^ […]

Read More…