Sooraj Abbasi Sooraj Abbasi - 4 months ago 36
HTML Question

How to change the vlaue of bootstrap progress bar using php

How can we change the value of bootstrap progress bar by using php variables.
Here is my code

<div class='progress'>
<div class='progress-bar progress-bar-success' role='progressbar' aria-valuenow='$paid_amount' aria-valuemin='0' aria-valuemax='$total_prize' style='width:$paid_amount%;'>


Try this,

$width = round(($paid_amount/$total_prize)*100,2);

echo '<div class="progress">
  <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="'.$width.'"
  aria-valuemin="0" aria-valuemax="'.$total_prize.'" style="width:'.$width.'%">
    '.$width.'% Complete