Issue
How can I check if a given number is within a range of numbers?
Solution
The expression:
($min <= $value) && ($value <= $max)
will be true if $value
is between $min
and $max
, inclusively
See the PHP docs for more on comparison operators
Answered By - Dancrumb Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.