How to implement the loading bar of the net n to the number n2?

Don't know how to Express the right thoughts. So I can not find in the Internet the sample solution. There is a code that determines the size of the database, for example, the variable n is equal to the number 748.14 KB need to set a maximum of, for example 10000000KB
ie, you should get something in the form of a strip to visually see how much space is occupied by valid. Any graph, chart or simple bar (progress bar).

Where to find such examples.
July 2nd 19 at 14:24
1 answer
July 2nd 19 at 14:26
<?php
 $max = 150; //(mb) maximum value === 100%
 $cur = 1.48; //(mb) current value
 $percent = ( $cur * 100 / $max );
 var_dump( "percentage use.%:", $percent ) ;
 echo( PHP_EOL );
 var_dump( "Remained available %:", 100 - $percent ) ; 
 echo( PHP_EOL );
 var_dump( "this in MB:", $max - ($max * $percent / 100) ) ;</code-->
br><br><br><a href="http://sandbox.onlinephpfunctions.com/code/872fafd0c7003a661ccec57cad745a1ea88de640" rel="nofollow" target="_blank">Code</a><br><br> string(40) "percentage of use.%: "<br> float(0.98666666666667)<br><br> string(34) "Remained available %:"<br> float(99.013333333333)<br><br> string(10) "And this is in megabytes:"<br> float(148.52)<br><br><a href="http://getbootstrap.com/components/#progress" rel="nofollow" target="_blank">Bootstrap to display</a>

Find more questions by tags JavaScriptPHPHTML