Demo PHP Check Digits Only

Check String Using preg_match() Function

Valid String: 11234

Invalid String: 1123.4

String contains only numeric digits

String does not contain only numeric digits

Check String Using Custom isNumber() Function

String contains only numeric digits

String does not contain only numeric digits



Back To Tutorial

I spent several hours to create this tutorial, if you want to say thanks so like my pages on Facebook & Twitter and leave your reviews here on Facebook.