in reply to Problem with traversing a two dimensional array

Anon already gave you the correct answer to fix your problem. However, there's one other thing you should note: