Print five star ratings and reviews I am using Fivestar rating in custom print. See image:



I'm trying to print a fivestar as follows:

$your_average = $variables['result']['node']-&gt;field_rating['und'][0]['average'];
$your_maximum = "100";
print theme('fivestar_static', $your_average, $your_maximum);


But, I'm getting the following error:


  Fatal error: Unsupported operand types in /var/www/html/book1/includes/theme.inc on line 1088


Any suggestions?
Looking at the definition of fivestar_static theme-function in fivestar.module file under fivestar_theme(), you need to provide the theme function with an array including the following keys: rating, stars, tag. A working example should look like:

$fivestar_variables = array('rating' =&gt; $your_average, 'stars' =&gt; $your_maximum);
print theme('fivestar_static', $fivestar_variables);