Reputation: 7645
I'm creating an array of alphabet letters.. It's cluttering the code and doesn't look too good for readability. Does PHP have a cleaner way or a function that already returns the alphabet in an array?
array ('a','b','c','d','e','f','g'..........................................);
Upvotes: 7
Views: 2279
Reputation: 145097
Just so no one has to attempt it, you can also do the same with capital letters:
$alpha = range('A', 'Z');
Upvotes: 4