How to change numeric customer ratings to stars:
The two star images are 13x12Code:#startop{ z-index: 1; background-image: url("/images/staryellow.gif"); background-repeat: repeat-x; height: 12px; } #starbottom{ z-index: 0; background-image: url("/images/stargrey.gif"); background-repeat: repeat-x; width: 65px; height: 12px; }
Short and sweet.Code:$width = $Rating[$m] * 13; echo '<div id = "starbottom"><div id = "startop" style = "width: '.$width.'px;"></div></div>';
Any questions?
Bookmarks