I'm not sure how to put this into words, but I'll try my best.
So I have a number. $number = 201
for example. This number rounds upto the next hundred. So 300, for example. I want to show my progress bar to show 201/300. Or if $number = 23 I want the progress bar to show 23 out of 100. Or $number = 506, shows 506/600.
So right now, I understand that the bootstrap progress bar runs by percentage. So 100%. So everything is fine, until $number passes over 100. Because it can't work where $number = 100 out of 200, because 100 would show up as 100%.
I'm pretty sure what I need, is a simple bit of maths, but right now, i can't think of how to do this.
<div class="progress" style="margin-bottom:0px">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: <?php echo $number; ?>%;">
<?php echo $number; ?>
</div>
</div>
Thank you
Edit: This is not a duplicate of how to round up to the nearest 10. This has already been done. using ceil($number / 100) * 100; This question is about how to make the percentage bar show something like 450 out of 500