Answers for "string without numbers php check"

PHP
6

php keep only numbers in string

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

php check if string or number

<?php if (is_numeric("cake")) { echo "Yes"; } else { echo "No"; } ?>
Posted by: Guest on February-08-2020

Code answers related to "string without numbers php check"

Browse Popular Code Answers by Language