title: Rounding to nearest 50 cents
body: <p>I have the following code that rounds my amounts to the nearest Dollar:</p>
  
  <pre><code>    switch ($amazonResult['SalesRank']) {
      case ($amazonResult['SalesRank'] &lt; 1 || trim($amazonResult['SalesRank'])===''|| !isset($amazonResult['SalesRank']) || $amazonResult['SalesRank']=== null):
          $Price=((float) $lowestAmazonPrice) * 0.05;
          $payPrice = round($Price, 0);  //to round the price up or down to the nearest $
          break; 
      case ($amazonResult['SalesRank'] &gt; 0 &amp;&amp; $amazonResult['SalesRank'] &lt;= 15000):
          $Price=((float) $lowestAmazonPrice) * 0.20;
          $payPrice = round($Price, 0);  //to round the price up or down to the nearest $
          break;
  </code></pre>
  
  <p>I understand that if I use round($Price, 2); that I will have 2 decimal places, but is there a way to round to the nearest 50 cents?</p>