Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- {#"%.2f"|sprintf:($item['prize']*0.03 + 128)#}
- $the_god_of_wealth = array();
- foreach ($order_by_month_rs['month']['data'] as $v)
- {
- if($v['prize'] > 10000) {
- $the_god_of_wealth[] = array($v['uid'], $v['namemask'], $v['prize']);
- }
- }
- //财神个数
- $uids = array();
- foreach ($the_god_of_wealth as $k => $v)
- {
- $uids[] = $v[1];
- }
- $idarr = array();
- foreach ($uids as $id)
- {
- $idcounts = 0;
- foreach ($uids as $ids)
- {
- if($id === $ids)
- {
- $idcounts +=1;
- }
- }
- $idarr[$id] = $idcounts;
- }
- $tmp = array_unique($idarr);
- $id_last = array();
- foreach ($idarr as $k => $v)
- {
- if (!isset($tmp[$k])) {
- $id_last[$k] = $v;
- }
- }
- $id_front = array_flip($tmp);
- krsort($id_front);
- # 查询月排行;
- $this->output = array(
- 'wealthest' => $the_god_of_wealth,
- 'wealthest_again' => array('front' => $id_front,'last' => $id_last),
- 'month' => 9,
- 'order_by_month' => $order_by_month_rs['month']
- );
Add Comment
Please, Sign In to add comment