in reply to push values to an element of an array and read the same

Is this homework relating to restructuring code, or is it real life application code you want to clean up? If it's real life code it'd help a lot if you give us the bigger picture so we can give you better advice. If it's homework tell us and tell us where you are having trouble.

In either case showing us some real code and the wanted output will help us understand the problem.

Premature optimization is the root of all job security
  • Comment on Re: push values to an element of an array and read the same