I suggest using css rules referenced via classname for this, e.g.
<p class="user star_<?php echo $no_stars;?>"><?php echo $username;?></p>
Then in your css - this is a very rough example, just to give you an idea:
.user{
padding-left: 20px;
background-repeat: none;
}
.star_1{
background-image: url(images/star1.gif);
}
.star_2{
background-image: url(images/star2.gif);
}
etc etc
If you need to know how to extract personal data from the user's record in a db - see some tutorials.
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080