I'm trying to create a dynamic rating bar which is out of 10, data is retrieved from the DB and is from 1 to 10, i was trying to use the imagefilledrect angle() function with no luck, any suggestions on an easier way to create one?
PHP Dynamic Rating Bar
Collapse
X
-
-
Hi ziycon.
I don't really get what the problem is.
Are you having difficulties displaying the data, or what?
If you simply need to show a "progress bar" of sorts to represent the rating, you could try just using CSS.
Like, say:
[code=html]
<div style="width: 100px; height: 20px; background: #000;">
<div style="width: <?php echo ($rating * 10); ?>%; height: 20px; background: #AAA;"></div>
</div>
[/code]
Where $rating is a value between 0 and 10.
If that isn't what you are looking for, please try explaining the problem a little better.
Comment