Question: PHP Regular Expressions -------------------------------------------------------------------------------------------------------------------- I have 2 arrays (phone number) $ValidInput=[2534441234,253-434-1234,253.345.5468, (235) 908 3456]; $inValidInput=[(235)-444-1234,(253-434-1234,253)12345678,206-.755-8180,206-4948181,2065438-987,253 345 )5342]; By PHP only please, I need to use
PHP Regular Expressions
--------------------------------------------------------------------------------------------------------------------
I have 2 arrays (phone number)
$ValidInput=["2534441234","253-434-1234","253.345.5468", "(235) 908 3456"];
$inValidInput=["(235)-444-1234","(253-434-1234","253)12345678","206-.755-8180","206-4948181","2065438-987","253 345 )5342"];
By PHP only please, I need to use php regular expression to vaild phone number, and make a loop on the arrays, for example :
for valdition phone number

and if we input invalid phone number we will get a message like below :
![908 3456"]; $inValidInput=["(235)-444-1234","(253-434-1234","253)12345678","206-.755-8180","206-4948181","2065438-987","253 345 )5342"]; By PHP only please, I need to](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66dfc8d055318_96766dfc8cfe77a0.jpg)
again, please use HTML form and PHP arrays with loop and regular expression to valid phone number,
Thanks,
YEAH MATCH!!! Test another phone number Phone number: 253-444-5555 Go! * Sorry that's not a valid phone number Test another phone number Phone number: 253)444-5555 Go
Step by Step Solution
There are 3 Steps involved in it
To validate phone numbers using PHP regular expressions and handle input through an HTML form you ca... View full answer
Get step-by-step solutions from verified subject matter experts
