Way to get all alphabetic chars in an array in PHP?

php

Question

Is there a way to get all alphabetic chars (A-Z) in an array in PHP so I can loop through them and display them?

1
167
1/11/2009 4:22:56 PM

Accepted Answer

$alphas = range('A', 'Z');
450
1/11/2009 4:03:40 PM

To get both upper and lower case merge the two ranges:

$alphas = array_merge(range('A', 'Z'), range('a', 'z'));

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon