Is there a way to test a range without doing this redundant code:
if ($int>$min && $int<$max)
?
Like a function:
function testRange($int,$min,$max){
return ($min<$int && $int<$max);
}
usage:
if (testRange($int,$min,$max))
?
Does PHP have such built-in function? Or any other way to do it?