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 Quote Link to comment Share on other sites More sharing options...
requinix Posted January 29, 2014 Share Posted January 29, 2014 What have you tried so far? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.