$name5= mb_substr('袁斯强', 0,1,'utf-8');
$ab=array("忠","少","小","斯","钦","义","仁","泉","仕","国","广","良","早","春","和","尚","节","高","祥","文","方","应","屯","旭","浪","宇","信","本","毛");
$ab2=array("华","毛","德","平","清","辉","强","云","保","坤","发","贵","水","如","元","贵","荣","根","亮","才","新","成","洪","庆","勇","财","进","斌","彬","兵");
$rand_keys1 = array_rand($ab,2);
$rand_keys2 = array_rand($ab2,2);
$rand_keys3 = array_rand($ab,2);
$rand_keys4 = array_rand($ab2,2);
$rand_keys5 = array_rand($ab,2);
$rand_keys6 = array_rand($ab2,2);
$rand_keys7 = array_rand($ab,2);
$rand_keys8 = array_rand($ab2,2);
$name1= $name5.$ab[$rand_keys1[0]].$ab2[$rand_keys2[1]];
$name2= $name5.$ab[$rand_keys3[1]].$ab2[$rand_keys4[0]];
$name3= $name5.$ab[$rand_keys5[0]].$ab2[$rand_keys6[1]];
$name4= $name5.$ab[$rand_keys7[1]].$ab2[$rand_keys8[0]];
echo $name1."</p>".$name2."</p>".$name3."</p>".$name4;
根据一个人的姓氏随机生成几个人的名字
最新推荐文章于 2024-08-16 07:44:40 发布