Answers for "php keep only letters and numbers"

PHP
1

php keep only numbers in string

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

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 "php keep only letters and numbers"

Browse Popular Code Answers by Language