本文整理匯總了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>';
}
?>