title: How to show round figure number in php?
body: <p>I have a variable called <code>$totalResults</code> which has dynamic values, depend on database entries. I need to show a limit like if <code>$totalResults</code> has <code>154</code> results then I want  show that 154 out of 500. But I want it dynamically, like if the result cross 500, example the result value is 514, then it'll show like 514 out of 1000.</p>
  <p>I don't want to use if, else conditions because the result will gradually increase, so i need to compare it dynamically, Like if result has 1500 entries, then I'll add +500 into it, Then it'll show Like 1500 out of 2000.</p>
  <p>I am confused in this part, If the result is not round figure, how can I make it right?</p>
  <p>My Logic:</p>
  <pre><code>$totalResult = 154;
  $newResult = $totalResult + 500;
  
  //Result = 654
  But I want to show this 154 out of 500 or 154 out of 1000
  </code></pre>