Gayner Posted September 20, 2009 Share Posted September 20, 2009 if(preg_match("/^[1-10]$/i", $betd)){ echo "Good Boy $betd"; }else{ echo "Why u hacking? $betd"; } My $betd is 3, and it still shows "Why u hacking?" It's only supposed to show that if it's out of range of 1-10 right? if not show me correct code, thx Quote Link to comment Share on other sites More sharing options...
ozestretch Posted September 20, 2009 Share Posted September 20, 2009 if ($betd>= 1 && $betd<= 10) { echo "Good Boy $betd"; }else{ echo "Why u hacking? $betd"; } My $betd is 3, and it still shows "Why u hacking?" It's only supposed to show that if it's out of range of 1-10 right? if not show me correct code, thanks 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.