直接上代码:
for($i=ord('a'), $n=ord('z'); $i<=$n; $i++){
echo chr($i),PHP_EOL;
}
echo PHP_EOL; $char = 'a';
while($char != 'aa'){
echo $char,PHP_EOL;
$char++;
}
echo PHP_EOL; foreach(range('a','z') as $char){
echo $char,PHP_EOL;
}
2022-08-29 13:17:47
直接上代码:
for($i=ord('a'), $n=ord('z'); $i<=$n; $i++){
echo chr($i),PHP_EOL;
}
echo PHP_EOL; $char = 'a';
while($char != 'aa'){
echo $char,PHP_EOL;
$char++;
}
echo PHP_EOL; foreach(range('a','z') as $char){
echo $char,PHP_EOL;
}