Home > Backend Development > PHP Tutorial > QQ special characters php randomly generates 10-digit character codes

QQ special characters php randomly generates 10-digit character codes

WBOY
Release: 2016-07-29 08:39:44
Original
1248 people have browsed it

Copy code The code is as follows:


function randStr($len)
{
$chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; // characters to build the password from
$string= '';
for(;$len> ;=1;$len--)
{
$position=rand()%strlen($chars);
$string.=substr($chars,$position,1);
}
return $string;
}
echo randStr(10)."
";


The above introduces the qq special characters PHP randomly generates 10-digit character codes, including the content of qq special characters. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template