Hi
ALL
I want to give input mask to a field to enter the time like 12:10:30
How to do this in php
Thanks
MD.Samiuddin
Hi
ALL
I want to give input mask to a field to enter the time like 12:10:30
How to do this in php
Thanks
MD.Samiuddin
What about this:
//Folowing functions return false id the expression s not found in $time
//24-hour notation (eg.: 21:10:30)
preg_match('/^(0[1-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/', $time);
//12-hour notation (eg.: 9:10:30PM)
preg_match('/^(0[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9])(AM|PM)$/', $time);