[php] 数値で8桁の乱数を100個生成する
数値で8桁の乱数を100個生成する
<?php for ($i = 0 ; $i < 100 ; $i++){ $pw = mt_rand(0,99999999); $pw2 = sprintf("%08d",$pw); echo "" . $pw2 . "<br />"; } ?>
<?php for ($i = 0 ; $i < 100 ; $i++){ $pw = mt_rand(0,99999999); $pw2 = sprintf("%08d",$pw); echo "" . $pw2 . "<br />"; } ?>
Similar Posts
Categoty in PHP
Copyright ©2011 PhonoKraft CO., LTD. ALL Rights Reserved.