Rounding to nearest 5/10 in PHP
<p>I have two inputs</p>

<pre><code>min, max
</code></pre>

<p>In the case where min=32 and max=46 then I would like PHP to automatically the value to the nearest 5/10 i.e. in this case min=30 and max=50? </p>

<p>But in the instance of course if <strong>min=35 or 40</strong> and <strong>max=40 or 45</strong> there would be no need to round off.</p>

<p>How do achieve this in PHP?</p>

<p>Btw the system only deals with integer values and the above values are just examples. It needs to work for a range of numbers ranging from 0 to infinity. So 4 would round to 0, 6 to 10... etc...</p>
