php remove non numbers from string code example
Example 1: php remove numbers from string
$words = preg_replace('/[0-9]+/', '', $words);
Example 2: php remove non numeric
$res = preg_replace("/[^0-9]/", "", "Every 6 Months" );
$words = preg_replace('/[0-9]+/', '', $words);
$res = preg_replace("/[^0-9]/", "", "Every 6 Months" );