zoukankan      html  css  js  c++  java
  • 幸运码

    随机抽取幸运码

    销毁幸运码

    更新码库

    Array
    (
        [0] => 10000017
        [1] => 10000004
        [2] => 10000011
        [3] => 10000025
        [4] => 10000015
        [5] => 10000012
        [6] => 10000009
        [7] => 10000005
        [8] => 10000022
        [9] => 10000019
        [10] => 10000013
        [11] => 10000021
        [12] => 10000020
        [13] => 10000014
        [14] => 10000010
        [15] => 10000007
        [16] => 10000006
        [17] => 10000016
        [18] => 10000001
        [19] => 10000008
        [20] => 10000003
        [21] => 10000023
        [22] => 10000018
    )
    4
    10000015
    Array
    (
        [0] => 10000017
        [1] => 10000004
        [2] => 10000011
        [3] => 10000025
        [5] => 10000012
        [6] => 10000009
        [7] => 10000005
        [8] => 10000022
        [9] => 10000019
        [10] => 10000013
        [11] => 10000021
        [12] => 10000020
        [13] => 10000014
        [14] => 10000010
        [15] => 10000007
        [16] => 10000006
        [17] => 10000016
        [18] => 10000001
        [19] => 10000008
        [20] => 10000003
        [21] => 10000023
        [22] => 10000018
    )
    $l_sql = "select Id,LuckNumberCollection,Remark from product_luckynumber  where Id=".$_POST['P_Term_id']."";
    $r_luck = mysql_query($l_sql,$con);
    while($row_luck = mysql_fetch_array($r_luck)){
        //echo "<pre>";
        $string =  ($row_luck['LuckNumberCollection']);
        //echo "</pre>";
    }
    $array=explode(',',$string); 
    
    echo "<pre>";
    print_r ($array);
    echo "</pre>";
    
    $key = (array_rand($array,1));
    echo $key;
    echo "<br>";
    print_r ($array[$key]);
    unset($array[$key]); 
    
    echo "<pre>";
    print_r ($array);
    echo "</pre>";
  • 相关阅读:
    slots属性(省内存,限制属性的定义)
    自定制格式化方式format
    改变对象的字符串显示__str__repr
    __getattribute__和item系列
    授权(类似)
    双下划线开头的attr方法
    动态导入模块
    反射
    python的单下划线和双下划线
    在子类中调用父类的方法
  • 原文地址:https://www.cnblogs.com/hellowzd/p/5495733.html
Copyright © 2011-2022 走看看