Return to Snippet

Revision: 49202
at July 18, 2011 13:33 by chopbust


Initial Code
function extract_number($string) {
	return ereg_replace("[^0-9]", "", $string); 
}

Initial URL


Initial Description
Give a string, and it will only returns numbers.

Initial Title
Extract Numbers from String

Initial Tags


Initial Language
PHP