<?php
$string='rifhgfhoihonjhhf';
for($x=0;$x<4;$x++)
{
echo $string{mt_rand(0,strlen($string)-1)};
}
?>
随机产生四位数的验证码!!!
$string='rifhgfhoihonjhhf';
for($x=0;$x<4;$x++)
{
echo $string{mt_rand(0,strlen($string)-1)};
}
?>
随机产生四位数的验证码!!!
2016-11-27
$string='YWAYFGYAHSFGYAHFGJAWHYGM';
$char=$string{mt_rand(0,strlen($string)-1)};
$charq=$string{mt_rand(0,strlen($string)-2)};
$string='582385637465726572665';
$charw=$string{mt_rand(0,strlen($string)-1)};
$chare=$string{mt_rand(0,strlen($string)-2)};
echo $char;echo $chare;echo $charq;echo $charw;
$char=$string{mt_rand(0,strlen($string)-1)};
$charq=$string{mt_rand(0,strlen($string)-2)};
$string='582385637465726572665';
$charw=$string{mt_rand(0,strlen($string)-1)};
$chare=$string{mt_rand(0,strlen($string)-2)};
echo $char;echo $chare;echo $charq;echo $charw;
2016-11-23