<?php $country = new country(false); while ($country->found()) { ?> <div class="col-md-4"> <div class="conx"> <h1><?php echo $country->name; ?> </h1> <div class="medals"> <p><?php echo $country->medal()->count(); ?> [medalstotal]</p> <?php if ($country->medal()->count() > 0) { ?> <p id="topmdld">[ofwhich]</p> <div class="medaldetails"> <?php $medalCounts = $country->medal()->typeCounts(); if ($medalCounts[0] > 0) { echo '<img src="/style/images/medal_gold.png" />', '<p>', $medalCounts[0], ' [gold] [medal](s)</p>'; } if ($medalCounts[1] > 0) {