I have a table that stores data. It has ratings for something that go 1-20. If something is a 1 then the page will load a bar with 5% width. Currently I have it so that the div uses style= and I just put the math in there.
<div class="bar" style="width:<?php $row["RATING"]*5 ?>%;">1/20</div>
That seems really messy but its the simplest way I could think of. Is there a cleaner more practical method?