本文整理汇总了PHP中Countries::short2long方法的典型用法代码示例。如果您正苦于以下问题:PHP Countries::short2long方法的具体用法?PHP Countries::short2long怎么用?PHP Countries::short2long使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Countries
的用法示例。
在下文中一共展示了Countries::short2long方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDisplayCountry
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']);
}
示例2: arsort
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>';
}
?>