Return to Snippet

Revision: 18836
at October 9, 2009 16:42 by jspicher


Initial Code
function string_to_number($string){
   $string = preg_replace('/[\'"]/', '', $string);
   $string = preg_replace('/[^0-9]+/', '', $string);
   $string = trim($string, '');
   $string = strtolower($string);
   return $string;}

Initial URL

                                

Initial Description
Convert a string to number.

Initial Title
string_to_number($string)

Initial Tags
php, function

Initial Language
PHP