if number exist in string php code example
Example: check if includes numbers php
if (preg_match('~[0-9]+~', $string)) {
echo 'string with numbers';
}
if (preg_match('~[0-9]+~', $string)) {
echo 'string with numbers';
}