Best way to list Alphabetical(A-Z) using PHP

前端 未结 11 2112
迷失自我
迷失自我 2020-12-13 13:33

I need to print/list alphabetical(A-Z) chararcters to manage Excel cells. Is there any PHP function to list alphabetic?

I need result as

A1
B1
C1
D1
..         


        
11条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 14:09

    You can do it in this way as well: ASCII range used here.

    for($i = 65 ; $i<=90; $i++)
    {
      echo chr($i);
    }
    

提交回复
热议问题