moisesbr Posted January 29, 2014 Share Posted January 29, 2014 Hi I need to program as follow: If a variable contains more than 3 numbers (as ACD 9455) say "too many numbers" If a variable has no number (as ACD JK) say "no number" Moises Link to comment https://forums.phpfreaks.com/topic/285760-numeric-field/ Share on other sites More sharing options...
requinix Posted January 29, 2014 Share Posted January 29, 2014 What have you tried so far? Link to comment https://forums.phpfreaks.com/topic/285760-numeric-field/#findComment-1466909 Share on other sites More sharing options...
moisesbr Posted January 29, 2014 Author Share Posted January 29, 2014 I will try the solution below. return preg_match_all( "/[0-9]/", $str ); and will let you know if I cannot achieve it. Moises Link to comment https://forums.phpfreaks.com/topic/285760-numeric-field/#findComment-1466913 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.