I have a while loop while ($row = $result->fetch_assoc()) {$i++ }
And then I want to do something like:
if ($i == 5 && the total number of items is more than 10) {do this}
In other words, if the increment goes to 10+ then $i == 5 should do something else do nothing
https://www.php.net/manual/en/mysqli-result.num-rows.php
if ($i == 5 && $result->num_rows > 10){do this}