Return to Snippet

Revision: 21710
at February 19, 2010 19:50 by jmiller


Updated Code
$numbers = preg_replace("/[^0-9]/", '', $numbers_and_letters);

Revision: 21709
at December 18, 2009 17:37 by jmiller


Initial Code
$numbers = ereg_replace("[^0-9]", '', $numbers_and_letters);

Initial URL

                                

Initial Description
Strips out every character except 0-9

Initial Title
Strip out all but numbers

Initial Tags
php, number

Initial Language
PHP