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