Validate Phone Numbers


Checking “$phone”


"; if (preg_match("/^(\(\d{3}\)\s*)?\d{3}[\s-]?\d{4}$/",$phone)) { echo "

“$phone” is valid

"; } else { echo "

“$phone” is not valid

"; } } ?>