title: Rounding to nearest fraction (half, quarter, etc.)
body: <p>So, I need to create the following functions but my head can't think of any possibility in PHP without complicated math.</p>
  
  <ul>
  <li>Round <strong>always</strong> up to the nearest decimal (1.81 = 1.90, 1.89 = 1.90, 1.85 = 1.90)</li>
  <li>Round <strong>always</strong> down to the nearest decimal (1.81 = 1.80, 1.89 = 1.80, 1.85 = 1.80)</li>
  <li>Round <strong>always</strong> up to the nearest x.25 / x.50 / x.75 / x.00 (1.81 = 2, 1.32 = 1.50)</li>
  <li>Round <strong>always</strong> down to the nearest x.25 / x.50 / x.75 / x.00 (1.81 = 1.75, 1.32 = 1.25)</li>
  <li>Round <strong>always</strong> up to the nearest x.50 / 1 (1.23 = 1.50, 1.83 = 2)</li>
  <li>Round <strong>always</strong> down to the nearest x.50 / 1 (1.23 = 1, 1.83 = 1.50)</li>
  </ul>
  
  <p>I have searched on Google for 2 hours now and the only things that came up were Excel forums. Is it possible with some simple lines of PHP?</p>