PHP range() from A to ZZ?

后端 未结 12 1162
不思量自难忘°
不思量自难忘° 2020-11-30 06:52

Is it possible to get a range with PHP from A to ZZ*?

a b c ... aa ... zx zy zz

For me this didn\'t work:

range(\'A\', \'ZZ\');
12条回答
  •  时光取名叫无心
    2020-11-30 07:17

    This is as far as I can help you (generate array with A through Z).

    $a = range(65, 90);
    array_walk($a, 'chr');
    

    Check out chr and array_walk

提交回复
热议问题