public function getDisplayCountry() { $flagname = strtolower($this->array["country"]); $flagpath = "images/flags/" . $flagname . ".png"; if (!file_exists($flagpath)) { $flagpath = "images/flags/unknown.png"; } return $country = '<img src="' . $flagpath . '"> ' . Countries::short2long($this->array['country']); }
echo '<li class="list-group-item"><div class="text-holder"><span class="title-text"> '; echo "0"; echo ' </span> <span class="description-text"> '; echo "None"; echo '</span></div> <span class="stat-value"> '; echo " + 0 "; echo '<i class="icon-sort"></i></span>'; } else { arsort($countryStats); $numberValues = array_values($countryStats); for ($i = 0; $i < 5 && $i < count($countryStats); $i++) { $number = $numberValues[$i]; $short = key($countryStats); next($countryStats); $icon = "<img src='images/flags/" . strtolower($short) . ".png'>"; $displayCountry = Countries::short2long($short); echo '<li class="list-group-item"><div class="text-holder"><span class="title-text"> '; echo $number; echo ' </span> <span class="description-text"> '; echo $icon . " " . $displayCountry; echo '</span></div> <span class="stat-value"> '; echo " + 0 "; echo '<i class="icon-sort"></i></span>'; } } echo '</ul> </div> </div>'; } ?>