How to collapse an array?
-
Hi there. I'm fiddling around with arrays and i need to collapse (re-arrange) an array. Currently i have no clue how to do it, so if anyone could help out with a little example or some hints i would be thankful. An example of what i want to do: --------------------------------- An array containing 5 elements 1 - 2 - 3 - 4 - 5 If i remove element index 3 from the array i want the index of element 4 to change to 3 and the index of element 5 to chance to 4. How is this possible? Thanks alot in advance!
-
Hi there. I'm fiddling around with arrays and i need to collapse (re-arrange) an array. Currently i have no clue how to do it, so if anyone could help out with a little example or some hints i would be thankful. An example of what i want to do: --------------------------------- An array containing 5 elements 1 - 2 - 3 - 4 - 5 If i remove element index 3 from the array i want the index of element 4 to change to 3 and the index of element 5 to chance to 4. How is this possible? Thanks alot in advance!
-
Hi there. I'm fiddling around with arrays and i need to collapse (re-arrange) an array. Currently i have no clue how to do it, so if anyone could help out with a little example or some hints i would be thankful. An example of what i want to do: --------------------------------- An array containing 5 elements 1 - 2 - 3 - 4 - 5 If i remove element index 3 from the array i want the index of element 4 to change to 3 and the index of element 5 to chance to 4. How is this possible? Thanks alot in advance!