title: How to display a dynamic rating based on css and the value from PHP?
body: <p>I want to display stars based on the value of PHP. 
  The rating is between 0 to 5 and it is decimal (3.5, 3.75)</p>
  
  <p>However, the stars that I can use are only full or half. So if it lower than 0.5 then I shall round it to zero, if it is more than 0.5 then round it to 1.</p>
  
  <p>If it is 0.5, it stays 0.5.</p>
  
  <p>The value from php is <code>$rating_sum</code> and it is calculated from the <code>sum_of_ratings</code> / <code>rating_times</code></p>
  
  <p>I use font awesome, so these are the stars <code>&lt;i class="fa fa-star"&gt;&lt;/i&gt;&lt;i class="fa fa-star-half-full"&gt;</code></p>
  
  <p>How can I do this?</p>
  
  <p>Thank you</p>