title: round to nearest multiple of 5 in a range in php
body: <p>I have this if statement:</p>
  
  <pre><code>if($_GET["angle_1"] &gt; 39) {
      $markers["###ANGLE###"] = "45"; 
  } elseif($_GET["angle_1"] &gt; 29 &amp;&amp; $_GET["angle_1"] &lt; 40) { 
      $markers["###ANGLE###"] = "35"; 
  } elseif($_GET["angle_1"] &lt; 30) {
       $markers["###ANGLE###"] = "25"; 
  } else { 
       $markers["###ANGLE###"] = "45"; 
  }
  </code></pre>
  
  <p>Is there a better / simpler way to do this check, f.x. with round that will round the integer to the nearest 5, i.e. 28 -> 25 or 34 -> 35 etc. and in that, if the integer is less than 25, it will always be 25 and if the integer is higher than 45, it will always be 45 and again if the integer is between 30 and 40 it will always be 35.</p>
  
  <p>That returned value will be used to display an image.</p>
  
  <p>EDIT:</p>
  
  <p>I have 3 images: image_25, image_35 and image_45, therefore the need to round.</p>