Home > php教程 > php手册 > body text

生成卡号php代码

WBOY
Release: 2016-06-13 12:29:13
Original
798 people have browsed it

复制代码 代码如下:


$a=1; //开始    
$b=2; //结束    
$c=$b-$a; //统计总共能生成多少张    
$ab=$IN['Number']=4; //几位数    
$a_c=$in['hdcount']=50; //生成多少张    
$asasd="a"; //卡号前缀    
if ($a_c>$c) //如果总共生成的 比 生成的多    
{    
    $a_c=$b;    
}else{    
    $a_c=$a+$a_c;    
}    
if ($a>$b)    
{    
    exit("开始必须比结束小");    
}    
for ($ca=$a;$ca{    
        $abc=$ab-(strlen($a));    
        for($s=0;$s        {    
            echo $ca="0".$ca;    
            echo "
";    
            if (strlen($ca)==$ab)    
            {    
                break;    
            }    
        }    

    echo  $asasd.$ca."
";    
    if ($a_c==$ca)    
    {    
        break;    
    }    
}    
?> 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template