Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php keep only numbers in string

$str = preg_replace('/[^0-9.]+/', '', $str);
 
PREVIOUS NEXT
Tagged: #php #numbers #string
ADD COMMENT
Topic
Name
2+3 =