SyntaxFix
Write A Post
Hire A Developer
Questions
I guess you want to do this:
$total_rating_count = count($total_rating_count); if ($total_rating_count > 0) // because you can't divide through zero $avg = round($total_rating_points / $total_rating_count, 1);