I tried to follow the instructions in this question: STAR rating with css but I've just a big problem.
When I do:
<span class="stars">1.75</span>
or
$foo='1.75';
echo '<span class="stars">'.$foo.'</span>
the stars is correctly shown, but as soon as I do:
while($val = mysql_fetch_array($result))
{
$average = ($val['services'] + $val['serviceCli'] + $val['interface'] + $val['qualite'] + $val['rapport'] ) / 5 ;
<span class="stars">.$average.</span>
}
the stars stops working
I double checked the data type in mysql:
they're all TINYINT(2)
and I tried this:
$average = intval($average);
but it's still not working,