title: How to list from A to Z in PHP, and then on to AA, AB, AC, etc
body: <p>I know how to list from A to Z:</p>
  
  <pre><code>foreach (range('A', 'Z') as $char) {
    echo $char . "\n";
  }
  </code></pre>
  
  <p>But how do I go on from there to list AA, AB, AC, AD, ... AZ, BA, BB, BC and so on?</p>
  
  <p>I did a quick Google search and couldn't find anything, though I guess the approach will be different.</p>
  
  <p>I think I can do it by using a for loop and an array with the letters inside, though that way seems a bit uncouth.</p>
  
  <p>Any other way?</p>
  
  <p>Thanks.</p>