<?php
//随机字母数字
$arr = array();
$str = '1234567890abcdefghijklmnopqrstuvwxyz';
for($i=0; $i<100; $i++){
$j = $str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)].$str[rand(0,35)];
if(!in_array($j,$arr))
$arr[] = $j;
}
var_dump($arr);
//如果要大写字母的话就在$str里面加上A-Z,同时rand()括号里面的不再是0-35,而是0-61
//$str = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ';
?>