Created
January 19, 2013 10:06
-
-
Save jpswade/4571750 to your computer and use it in GitHub Desktop.
How do you remove numbers from a string in PHP?
This file contains hidden or 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 = 'abc123'; | |
$string = str_replace(range(0,9), '', $string); | |
echo $string; | |
/* http://codepad.org/AYECJrbZ */ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment