in reply to Filling An Array
Did you mean the most concise way? I'm sure we could shorten array variables down for you.
Least memory exhaustive? Replacing foreach and those arrays to for(i=0;i<=7;i++ ) and assigning chr(i+65), and another for loop, with a sprintf could work better -- i haven't tested.
Fastest? maybe the memory trick above may be marginally faster.
I think your solution, is "good enough". Unless you are running it 1million times and need to optimize, this should do you well. It's very self documenting, easily maintainable and most straight forward. Unless you are playing golf, leave it alone! :)
|
---|