View Single Post
Old 09-23-2010, 07:29 PM   #2 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

I'm not really sure "better" would be the correct term to use, but there are a few things I'd do differently.

First would be to use the range() (docs) function to generate the array of letters: range('A', 'Z') I'd also use foreach since you simple want to loop over all of the values present in the array.

Is there anything you're unsure about, when using or looping through arrays?
Salathe is offline  
Reply With Quote