php filter only numbers
snippet in php

php filter only numbers

user7868

$output = preg_replace( '/[^0-9]/', '', $string );