当前位置: 首页>>代码示例>>PHP>>正文


PHP Fn::to_cnnum方法代码示例

本文整理汇总了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;
 }
开发者ID:GavinLai,项目名称:SimMatch,代码行数:42,代码来源:Match_Model.php


注:本文中的Fn::to_cnnum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。