how to Removes all characters except digits from a variable in php code example
Example 1: php remove non numeric
$res = preg_replace("/[^0-9]/", "", "Every 6 Months" );
Example 2: php remove characters not numbers or letters
$res = preg_replace("/[^a-zA-Z0-9\s]/", "", $string);
Example 3: print only some characters of a string in php
substr(string,start,length)