php - Html attribute with echo -
i have next html element:
<div class="bar bar-success" style="width: 20%;"><? echo $pass; ?></div>
now, want width element changed according echo element .
i try next:
<div class="bar bar-success" style=<? echo $pass; ?>/<? echo $fail; ?>%;><? echo $pass; ?></div>
but doesn't work. how can it?
this might help....
<div class="bar bar-success" style="width: <?php echo round($pass/$fail); ?>%"><?php echo $pass; ?></div>
Comments
Post a Comment