Try:
<?php function getRatingImage($rating) { $vals = ['zero','half','one','one_half','two','two_half','three','three_half','four','four_half','five']; $ndx = intval($rating * 2); if($ndx > 10){$ndx = 10}; return "./" + $vals[$ndx] + ".jpg"; } ?>
Try: