djfox Posted January 7, 2008 Share Posted January 7, 2008 If I want to make an if statement where $value is between $a and $a + 15, how do I make this if statement with an in between? Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/ Share on other sites More sharing options...
teng84 Posted January 7, 2008 Share Posted January 7, 2008 what????????? Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/#findComment-433130 Share on other sites More sharing options...
djfox Posted January 8, 2008 Author Share Posted January 8, 2008 In between, as in "choose a number between 5 and 10. Anything below 5 or above 10 does not count." Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/#findComment-433131 Share on other sites More sharing options...
fert Posted January 8, 2008 Share Posted January 8, 2008 In between, as in "choose a number between 5 and 10. Anything below 5 or above 10 does not count." if($a>5 && $a<10) Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/#findComment-433133 Share on other sites More sharing options...
djfox Posted January 8, 2008 Author Share Posted January 8, 2008 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/#findComment-433134 Share on other sites More sharing options...
kratsg Posted January 8, 2008 Share Posted January 8, 2008 <?php if($value >= $a && $value <= $a+15){//if $value is between $a and $a+15 //do something } else { //do something else } ?> Quote Link to comment https://forums.phpfreaks.com/topic/84944-solved-between-two-values/#findComment-433135 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.