Remove Non Numeric Characters

function  remove_non_numeric($string)
{
	return preg_replace('/D/', '', $string)
}

// OR

$result = ereg_replace( '[^0-9]+', '', $source );

source

Comments are closed.