I am a little stuck.
I have a Mysql database with items. Each item already has a corresponding rating (0-5).
Now, when I display the list of items, I want to convert the rating in stars.
They may not be clickable.
But how can I display rating stars for each rating?
Like:
Item[1] Rating: 4 => display 4 stars
Item[2] Rating: 2 => display 2 stars
Item[3] Rating: 1 => display 1 star
and so on
I am calling the existing rating like this:
php echo $item['Item']['rating']
str_repeat():