So you use $review_average - what's that? Meaning it has to be defined somewhere in your code meaning there should be $review_average = thisThing. Your code is asking the same question and not finding the definition.lecarlb wrote: ↑Thu Feb 29, 2024 8:54 am I tried the following. Lol.Code: Select all
<?php $review_stars_array = []; if ($review_average['count'] > 0) { $review_stars_array[] = tep_draw_stars((int)$review_average['average']); } foreach ($review_stars_array as $i => $rating) { echo '<div class="pl-3 ' . $i . '">' . $rating . ' (' . $review_average['count'] . ')</div>'; } ?>
The definition is actually further up in the linked code (which you have not included in your code). That definition itself is a result of another definition further up in the linked code (the database query). Look again, try again, rinse, repeat