php if integer between a range?
<p>is there a way to test a range without doing this redundant code</p>

<pre><code>if ($int&gt;$min &amp;&amp; $int&lt;$max)
</code></pre>

<p>?</p>

<p>like a function:</p>

<pre><code>function testRange($int,$min,$max){
    return ($int&gt;$min &amp;&amp; $int&lt;$max);
}
</code></pre>

<p>usage:</p>

<pre><code>if (testRange($int,$min,$max)) 
</code></pre>

<p>?</p>

<p>Does php have such built-in function? Or any other way to do it?</p>
