Question
please I need php code to vaild phone number as below by using arrays: array 1 Vaild phone number xxxxxxxxxx xxx-xxx -xxxx xxx.xxx.xxxx (xxx) xxx
please I need php code to vaild phone number as below by using arrays:
array 1 Vaild phone number xxxxxxxxxx xxx-xxx -xxxx xxx.xxx.xxxx (xxx) xxx xxxx
array 2 Invalid phone number (xxx)-xxx-xxxx (xxx-xxx-xxxx xxx)xxxxxxx xxx-.xxx-xxxx xxx-xxxxxxx xxxxxx-xxxx xxx xxx xxxx
For phone checker by PHP, please I need to create two arrays of phone numbers, using the patterns above. One array should contain only invalid phone numbers. The other array should contain only valid phone numbers. Use numbers 0,1, ... 9 instead of the x. Vary the numbers you use, after that use regular expressions to test for Valid formats based on the rules above, after that create loop through the arrays. For each value, echo the phone number. Also, display whether the valid checker code finds the phone number valid or invalid.
output might look like this:
253.000.4567 is not a valid phone number 2931234567 is not a valid phone number 222-123-4000 is a valid phone number
Thanks,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started