Jump to content
Larry Ullman's Book Forums

Recommended Posts

I have a question for those with more experience than me.

 

How does a foreach loop work if you have items in an array which are numerically indexed but in the wrong the order for example  2, 3, 1 and not 0, 1, 2. Will the foreach loop still go through each item in the order its in, or does the foreach loop sort out the values in the array first? -_-

 

The reason i am asking this is because i have a situation when i will need server data to be in the unordered numerical format.

 

Your help would be much appreciated by me.

Link to comment
Share on other sites

 Share

×
×
  • Create New...