Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $anzahl = 1;
- $all = 5;
- $durchschnitt = $all / $anzahl;
- $prozent = ($durchschnitt-1)/4*100;
- if($prozent == 0) { $x = 0; }
- elseif($prozent >= 0) { $x = 12; }
- elseif($prozent >= 1) { $x = 24; }
- elseif($prozent >= 2) { $x = 36; }
- elseif($prozent >= 3) { $x = 48; }
- elseif($prozent >= 4) { $x = 59; }
- ?>
- <div style="background:url(../img/rating_min.png) no-repeat; height: 12px; width: 59px;">
- <div style="background:url(../img/rating_max.png) no-repeat; width: <?=$x?>px; height: 12px;">
- </div>
- </div>
Add Comment
Please, Sign In to add comment