PHP - Rounding of numbers to nearest multiple of 0.5
<p>Just had a really simple question.</p>

<p>I'm making a review system and I want the scores to be rounded off to the nearest multiple of 0.5</p>

<p>So what I mean is:</p>

<blockquote>
  <p><strong>0 / 0.5 / 1 / 1.5 / 2 / 2.5 /....</strong></p>
</blockquote>

<p>What's the best way of doing this?</p>

<p>I currently have this code but this isn't working</p>

<pre><code>$score = ($food + $staff + $value + $atmosphere) / 4;
$score = ceil($score * 2) / 2;
</code></pre>