getItem($showidx); foreach($itemDetails as $item){} ?> getItemRating($showidx); $ratingNumber = 0; $count = 0; $fiveStarRating = 0; $fourStarRating = 0; $threeStarRating = 0; $twoStarRating = 0; $oneStarRating = 0; foreach($itemRating as $rate){ $ratingNumber+= $rate['ratingNumber']; $count += 1; if($rate['ratingNumber'] == 5) { $fiveStarRating +=1; } else if($rate['ratingNumber'] == 4) { $fourStarRating +=1; } else if($rate['ratingNumber'] == 3) { $threeStarRating +=1; } else if($rate['ratingNumber'] == 2) { $twoStarRating +=1; } else if($rate['ratingNumber'] == 1) { $oneStarRating +=1; } } $average = 0; if($ratingNumber && $count) { $average = $ratingNumber/$count; } ?>


Rating and Reviews

/ 5

5
4
3
2
1

getItemRating($showidx); foreach($itemRating as $rating){ $date=date_create($rating['created']); $reviewDate = date_format($date,"M d, Y"); $profilePic = "profile.png"; if($rating['avatar']) { $profilePic = $rating['avatar']; } ?>
By