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 Link to comment https://forums.phpfreaks.com/topic/174871-solved-preg_match-help/ 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 Link to comment https://forums.phpfreaks.com/topic/174871-solved-preg_match-help/#findComment-921607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.