Created
June 12, 2013 23:01
-
-
Save anunay/5769881 to your computer and use it in GitHub Desktop.
PHP: Strip Non-Alphanumeric Chars from a String
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 | |
$string = preg_replace("/[^a-z0-9]+/i", "", $string); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment