need help with array

Please read the post by Nick Gammon at the top of this Forum on how to post source code using code tags. Also, before you post your code, use Ctrl-T in the IDE to format your code in a standard style. It will help us help you. Also, you can still use code tags on your first post using the Edit feature here.