Skip to content

Instantly share code, notes, and snippets.

@binaryweavers
Created May 5, 2021 00:19
Show Gist options
  • Save binaryweavers/1c1b00dd63b9f4e8bb3ceb0a1db70954 to your computer and use it in GitHub Desktop.
Save binaryweavers/1c1b00dd63b9f4e8bb3ceb0a1db70954 to your computer and use it in GitHub Desktop.
<?php
function incrementChar(string $start = 'A', string $end = 'Z')
{
$chars = [];
for ($i = $start; $i !== $end; $i++)
{
$chars[] = $i;
}
$chars[] = $end;
return $chars;
}
print_r(incrementChar('AAA','ZZZ'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment