Edward Posted May 15, 2014 Share Posted May 15, 2014 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 More sharing options...
Edward Posted May 15, 2014 Author Share Posted May 15, 2014 Its okay i have this worked out, so there no need to reply to this post. Link to comment Share on other sites More sharing options...
Larry Posted May 17, 2014 Share Posted May 17, 2014 13 minutes to solve the problem! Sometimes you just need to write it out to see it. Link to comment Share on other sites More sharing options...
Recommended Posts