本文整理汇总了PHP中Fn::to_cnnum方法的典型用法代码示例。如果您正苦于以下问题:PHP Fn::to_cnnum方法的具体用法?PHP Fn::to_cnnum怎么用?PHP Fn::to_cnnum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fn
的用法示例。
在下文中一共展示了Fn::to_cnnum方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parsePlayerList
static function parsePlayerList($player_list, $see_weekinfo = array(), $include_before = false)
{
if (!empty($player_list)) {
$week_player_ids = [];
if ($include_before) {
$week_player_ids = self::getRankWeekPlayerIds($see_weekinfo);
}
foreach ($player_list as &$it) {
$it['rankflag'] = 0;
$it['ranktxt'] = '';
if ($it['stage'] > 0) {
if ($it['rankno'] <= 30) {
$it['rankflag'] = 3;
$it['ranktxt'] = '决赛席位争夺中...';
}
} else {
if (!$include_before && !empty($see_weekinfo)) {
if ($it['player_id'] == $see_weekinfo['player_id1']) {
//只显示最新冠军数据
$it['rankflag'] = 1;
$it['ranktxt'] = '第' . Fn::to_cnnum($see_weekinfo['weekno']) . '周人气女神';
}
if ($it['player_id'] == $see_weekinfo['player_id2']) {
$it['rankflag'] = 2;
$it['ranktxt'] = '第' . Fn::to_cnnum($see_weekinfo['weekno']) . '周鲜花女神';
}
} elseif ($include_before && !empty($week_player_ids)) {
//之前冠军数据也显示
if (in_array($it['player_id'], $week_player_ids['player_ids1'])) {
$it['rankflag'] = 1;
$it['ranktxt'] = '第' . Fn::to_cnnum($week_player_ids['weekno']['id1_' . $it['player_id']]) . '周人气女神';
}
if (in_array($it['player_id'], $week_player_ids['player_ids2'])) {
$it['rankflag'] = 2;
$it['ranktxt'] = '第' . Fn::to_cnnum($week_player_ids['weekno']['id2_' . $it['player_id']]) . '周鲜花女神';
}
}
}
}
}
return $player_list;
}