Answers for "how to filter string and get only number and char inside it only by php"

PHP
6

php keep only numbers in string

$str = preg_replace('/[^0-9.]+/', '', $str);
Posted by: Guest on February-25-2020
2

php keep only letters and numbers

$result = preg_replace("/[^a-zA-Z0-9]+/", "", $s);
Posted by: Guest on May-21-2020

Code answers related to "how to filter string and get only number and char inside it only by php"

Browse Popular Code Answers by Language