<?php$str='abcdefghijklmnopqrstuvwxyz'; $count = 123456789;$str1 = $str[floor(floor(floor(floor(floor($count/26)/26)/26)/26)/26)];$str2 = $str[floor(floor(floor(floor($count/26)/26)/26)/26)%26];$str3 = $str[floor(floor(floor($count/26)/26)/26)%26];$str4 = $str[floor(floor($count/26)/26)%26];$str5 = $str[floor($count/26)%26];$str6 = $str[$count%26];echo $str1.'<br/>';echo $str2.'<br/>';echo $str3.'<br/>';echo $str4.'<br/>';echo $str5.'<br/>';echo $str6.'<br/>';?>
考察一下
$n = floor(floor(floor(floor(floor($count/26)/26)/26)/26)/26);var_dump($n);
考察一下
$n = floor(floor(floor(floor(floor($count/26)/26)/26)/26)/26);var_dump($n);
我后来直接用(int)强制转了下成功了。