$cat_name
";
$rating_query = "SELECT ROUND(AVG(rating),1) AS avg_rating FROM reviews WHERE product_id='$pro_id '";
$run_review_query = mysqli_query($con,$rating_query);
$review_row = mysqli_fetch_array($run_review_query);
if($review_row > 0){
$avg_count=$review_row["avg_rating"];
$i=1;
while($i <= round($avg_count ?? 0)){
$i++;
echo'
';
}
$i=1;
while($i <= 5-round($avg_count ?? 0)){
$i++;
echo'
';
}
}
echo "