PHP - loop through letters

前端 未结 3 814
名媛妹妹
名媛妹妹 2021-02-18 16:54

I am trying to loop through letters rather than numbers.

I am trying to do this using chr and the number equivalent but it doesn\'t seem to be happening!

I want

3条回答
  •  情话喂你
    2021-02-18 17:14

    Another way to solve this

    $i = 'AAAA';
    do {
      echo $i . "\n";
      $i++;
    } while( $i !== 'AAAAA');
    

提交回复
热议问题