php remove non numeric
snippet in php

php remove non numeric

user199

$res = preg_replace("/[^0-9]/", "", "Every 6 Months" );

php remove characters not numbers or letters

user6076

$res = preg_replace("/[^a-zA-Z0-9\s]/", "", $string);