simple function to remove non numeric characters from a string with PHP
12 May 2011stripNonNumeric.php
<?php
/*
Remove non-numeric characters from a string.
*/
function stripNonNumeric($str='') {
return preg_replace('(\D+)', '', $str);
}
?>
Refer gist for comments https://gist.github.com/justinkelly/953216